зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1555949 - Make <svg:script> run correctly in a shadow tree. r=violet
Differential Revision: https://phabricator.services.mozilla.com/D35191 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a235dfa68b
Коммит
db77aa9495
|
@ -186,8 +186,7 @@ nsresult SVGScriptElement::BindToTree(BindContext& aContext, nsINode& aParent) {
|
|||
nsresult rv = SVGScriptElementBase::BindToTree(aContext, aParent);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// FIXME(emilio, bug 1555949): Should be IsInComposedDoc().
|
||||
if (IsInUncomposedDoc()) {
|
||||
if (IsInComposedDoc()) {
|
||||
MaybeProcessScript();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
|
||||
<link rel="author" href="https://mozilla.org" title="Mozilla">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1555949">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="host"></div>
|
||||
<script>
|
||||
let svgScript = document.createElementNS("http://www.w3.org/2000/svg", "script");
|
||||
svgScript.innerHTML = `test(function() {}, "svg:script runs correctly in a shadow tree");`;
|
||||
document.getElementById("host").attachShadow({ mode: "open" }).appendChild(svgScript);
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче