Spec-Zone.ru › Dart 1

dart:html

Свойство top

WindowBase top

Ссылка на самое верхнее окно в иерархии окон.

Если это WindowBase самое верхнее WindowBase, top вернет ссылку на WindowBase само.

// Add an IFrame to the current window.
IFrameElement myIFrame = new IFrameElement();
window.document.body.elements.add(myIFrame);

// Add an IFrame inside of the other IFrame.
IFrameElement innerIFrame = new IFrameElement();
myIFrame.elements.add(innerIFrame);

print(myIframe.contentWindow.top == window) // 'true'
print(innerIFrame.contentWindow.top == window) // 'true'

print(window.top == window) // 'true'

Исходный код

@DomName('Window.top')
@DocsEditable()
WindowBase get top => _convertNativeToDart_Window(
    _blink.BlinkWindow.instance.top_Getter_(this));

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/Window/top.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API