Bug 642145 - Avoid firing document-element-inserted for non-element insertions to the document node. r=jonas.
This commit is contained in:
@@ -260,9 +260,10 @@ nsHtml5TreeOperation::AppendToDocument(nsIContent* aNode,
|
||||
|
||||
NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
|
||||
"Someone forgot to block scripts");
|
||||
nsContentUtils::AddScriptRunner(
|
||||
new nsDocElementCreatedNotificationRunner(doc));
|
||||
|
||||
if (aNode->IsElement()) {
|
||||
nsContentUtils::AddScriptRunner(
|
||||
new nsDocElementCreatedNotificationRunner(doc));
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user