From c90cf0b97da0cfcccb9130c31b53dca1dffc4c52 Mon Sep 17 00:00:00 2001 From: ldm0 Date: Thu, 3 Sep 2026 09:37:28 +0800 Subject: [PATCH] fix(html): reflect iframe CSP attribute --- .../detached/legacy_resources_and_document_mutations.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moli-renderer-v8/src/script_vm/tests/dom_elements/detached/legacy_resources_and_document_mutations.rs b/moli-renderer-v8/src/script_vm/tests/dom_elements/detached/legacy_resources_and_document_mutations.rs index f512fda1007..0ac77ce8d3a 100644 --- a/moli-renderer-v8/src/script_vm/tests/dom_elements/detached/legacy_resources_and_document_mutations.rs +++ b/moli-renderer-v8/src/script_vm/tests/dom_elements/detached/legacy_resources_and_document_mutations.rs @@ -942,6 +942,7 @@ fn detached_resource_template_accessors_use_owner_prototypes() { for (const name of ["integrity", "rev", "type"]) { accessor(HTMLLinkElement.prototype, name); } + accessor(HTMLIFrameElement.prototype, "csp"); accessor(HTMLIFrameElement.prototype, "sandbox"); accessor(HTMLIFrameElement.prototype, "allowFullscreen"); for (const name of ["default", "kind", "src", "srclang", "label"]) { @@ -1026,6 +1027,7 @@ fn detached_resource_template_accessors_use_owner_prototypes() { const sandbox = iframe.sandbox; assert(Object.prototype.toString.call(sandbox) === "[object DOMTokenList]", "iframe sandbox type"); assert(sandbox === iframe.sandbox, "iframe sandbox SameObject"); + iframe.csp = 123456; iframe.sandbox = "allow-scripts"; iframe.allowFullscreen = true; assert(iframe.csp === "123456" && iframe.getAttribute("csp") === "123456", "iframe csp");