mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #17381 - cbrewster:custom_element_creation, r=jdm
Custom element creation <!-- Please describe your changes on the following line: --> This implements the CE-related steps when creating elements. `is` is now support by `document.createElement` and is stored on `Element`s. Only synchronously created autonomous elements are supported as async element creation and customized built-in elements both require custom element upgrade reactions. Spec: https://dom.spec.whatwg.org/#concept-create-element --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17191 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17381) <!-- Reviewable:end -->
This commit is contained in:
commit
bc3ec0ce1b
34 changed files with 286 additions and 287 deletions
|
@ -152,7 +152,7 @@ impl HTMLCollection {
|
|||
}
|
||||
|
||||
fn match_element(elem: &Element, qualified_name: &LocalName) -> bool {
|
||||
match elem.prefix() {
|
||||
match elem.prefix().as_ref() {
|
||||
None => elem.local_name() == qualified_name,
|
||||
Some(prefix) => qualified_name.starts_with(&**prefix) &&
|
||||
qualified_name.find(":") == Some(prefix.len()) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue