mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Support arbitrary protos when wrapping DOM objects with constructors.
This commit is contained in:
parent
d9600ff50f
commit
dbff26bce0
197 changed files with 2028 additions and 586 deletions
|
@ -225,10 +225,12 @@ unsafe fn html_constructor(
|
|||
None => {
|
||||
// Step 8.1
|
||||
let name = QualName::new(None, ns!(html), definition.local_name.clone());
|
||||
// Any prototype used to create these elements will be overwritten before returning
|
||||
// from this function, so we don't bother overwriting the defaults here.
|
||||
let element = if definition.is_autonomous() {
|
||||
DomRoot::upcast(HTMLElement::new(name.local, None, &*document))
|
||||
DomRoot::upcast(HTMLElement::new(name.local, None, &*document, None))
|
||||
} else {
|
||||
create_native_html_element(name, None, &*document, ElementCreator::ScriptCreated)
|
||||
create_native_html_element(name, None, &*document, ElementCreator::ScriptCreated, None)
|
||||
};
|
||||
|
||||
// Step 8.2 is performed in the generated caller code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue