aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2023-05-28 22:43:55 -0400
committerJosh Matthews <josh@joshmatthews.net>2023-05-28 23:23:12 -0400
commitdbff26bce05d404027ef5bbfd85fb5995e4726bc (patch)
tree6ebb631eef396c2f387fe8269b0d59bde0dccae2 /components/script/dom/htmlscriptelement.rs
parentd9600ff50f3c1bdd8c44e2dfc15a18416d80cb82 (diff)
downloadservo-dbff26bce05d404027ef5bbfd85fb5995e4726bc.tar.gz
servo-dbff26bce05d404027ef5bbfd85fb5995e4726bc.zip
Support arbitrary protos when wrapping DOM objects with constructors.
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r--components/script/dom/htmlscriptelement.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index 1a0afeb1c84..9fe67db44a0 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -46,6 +46,7 @@ use js::jsapi::{CanCompileOffThread, CompileToStencilOffThread1, OffThreadToken}
use js::jsval::UndefinedValue;
use js::rust::{
transform_str_to_source_text, CompileOptionsWrapper, FinishOffThreadStencil, Stencil,
+ HandleObject,
};
use msg::constellation_msg::PipelineId;
use net_traits::request::{
@@ -194,13 +195,15 @@ impl HTMLScriptElement {
local_name: LocalName,
prefix: Option<Prefix>,
document: &Document,
+ proto: Option<HandleObject>,
creator: ElementCreator,
) -> DomRoot<HTMLScriptElement> {
- Node::reflect_node(
+ Node::reflect_node_with_proto(
Box::new(HTMLScriptElement::new_inherited(
local_name, prefix, document, creator,
)),
document,
+ proto,
)
}