mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
createElement can now take an ignored string for options
This commit is contained in:
parent
3e77a0ae09
commit
8184a25c17
5 changed files with 24 additions and 18 deletions
|
@ -9,6 +9,7 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{
|
|||
DocumentMethods, ElementCreationOptions,
|
||||
};
|
||||
use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use crate::dom::bindings::codegen::UnionTypes::StringOrElementCreationOptions;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
|
@ -105,10 +106,13 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
let maybe_elem = if qname.is_empty() {
|
||||
None
|
||||
} else {
|
||||
let options = ElementCreationOptions { is: None };
|
||||
let options =
|
||||
StringOrElementCreationOptions::ElementCreationOptions(ElementCreationOptions {
|
||||
is: None,
|
||||
});
|
||||
match doc
|
||||
.upcast::<Document>()
|
||||
.CreateElementNS(maybe_namespace, qname, &options)
|
||||
.CreateElementNS(maybe_namespace, qname, options)
|
||||
{
|
||||
Err(error) => return Err(error),
|
||||
Ok(elem) => Some(elem),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue