W3cubDocs

/Dart 2

parent property

WindowBase parent

A reference to the parent of this window.

If this WindowBase has no parent, parent will return a reference to the WindowBase itself.

IFrameElement myIFrame = new IFrameElement();
window.document.body.elements.add(myIFrame);
print(myIframe.contentWindow.parent == window) // 'true'

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

Implementation

WindowBase get parent;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-html/WindowBase/parent.html