mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Support arbitrary protos when wrapping DOM objects with constructors.
This commit is contained in:
@@ -11,6 +11,7 @@ use crate::dom::node::Node;
|
||||
use crate::dom::nodelist::NodeList;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLMeterElement {
|
||||
@@ -35,12 +36,14 @@ impl HTMLMeterElement {
|
||||
local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
proto: Option<HandleObject>,
|
||||
) -> DomRoot<HTMLMeterElement> {
|
||||
Node::reflect_node(
|
||||
Node::reflect_node_with_proto(
|
||||
Box::new(HTMLMeterElement::new_inherited(
|
||||
local_name, prefix, document,
|
||||
)),
|
||||
document,
|
||||
proto,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user