mirror of
https://github.com/servo/servo
synced 2026-05-03 21:02:19 +02:00
Support arbitrary protos when wrapping DOM objects with constructors.
This commit is contained in:
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user