mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Use specific assertion for DOM create
This commit is contained in:
parent
9ee27d62ae
commit
5486335708
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ fn create_svg_element(name: QualName,
|
||||||
prefix: Option<Prefix>,
|
prefix: Option<Prefix>,
|
||||||
document: &Document)
|
document: &Document)
|
||||||
-> DomRoot<Element> {
|
-> DomRoot<Element> {
|
||||||
assert!(name.ns == ns!(svg));
|
assert_eq!(name.ns, ns!(svg));
|
||||||
|
|
||||||
macro_rules! make(
|
macro_rules! make(
|
||||||
($ctor:ident) => ({
|
($ctor:ident) => ({
|
||||||
|
@ -119,7 +119,7 @@ fn create_html_element(name: QualName,
|
||||||
creator: ElementCreator,
|
creator: ElementCreator,
|
||||||
mode: CustomElementCreationMode)
|
mode: CustomElementCreationMode)
|
||||||
-> DomRoot<Element> {
|
-> DomRoot<Element> {
|
||||||
assert!(name.ns == ns!(html));
|
assert_eq!(name.ns, ns!(html));
|
||||||
|
|
||||||
// Step 4
|
// Step 4
|
||||||
let definition = document.lookup_custom_element_definition(&name.ns, &name.local, is.as_ref());
|
let definition = document.lookup_custom_element_definition(&name.ns, &name.local, is.as_ref());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue