mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 23:18:26 +00:00
[DOM/NPAPI] Defer loading object when setting attribute.
This commit is contained in:
@@ -193,7 +193,13 @@ HTMLObjectElement::AfterMaybeChangeAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
// attributes before inserting the node into the document.
|
||||
if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
|
||||
aName == nsGkAtoms::data) {
|
||||
return LoadObject(aNotify, true);
|
||||
nsContentUtils::AddScriptRunner(NS_NewRunnableFunction(
|
||||
[self = RefPtr<HTMLObjectElement>(this), aNotify]() {
|
||||
if (self->IsInComposedDoc()) {
|
||||
self->LoadObject(aNotify, true);
|
||||
}
|
||||
}));
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user