Check that an iframe is in a document with a browsing context before processing src.

This commit is contained in:
Alan Jeffrey 2016-10-28 12:17:23 -05:00
parent dafc57e8ab
commit 1803a585e5
2 changed files with 24 additions and 4 deletions

View file

@ -771,6 +771,10 @@ impl Node {
self.owner_doc().is_html_document()
}
pub fn is_in_doc_with_browsing_context(&self) -> bool {
self.is_in_doc() && self.owner_doc().browsing_context().is_some()
}
pub fn children(&self) -> NodeSiblingIterator {
NodeSiblingIterator {
current: self.GetFirstChild(),