mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Set is
value when constructing custom elements with the new
operator (#35930)
* Add doc comments throughout the code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set is-value for elements constructed with the "new" operator Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow custom elements to extend <slot> Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
bb3d28bca7
commit
b10c53ba6b
7 changed files with 71 additions and 373 deletions
|
@ -174,6 +174,7 @@ pub struct Element {
|
|||
attrs: DomRefCell<Vec<Dom<Attr>>>,
|
||||
#[no_trace]
|
||||
id_attribute: DomRefCell<Option<Atom>>,
|
||||
/// <https://dom.spec.whatwg.org/#concept-element-is-value>
|
||||
#[no_trace]
|
||||
is: DomRefCell<Option<LocalName>>,
|
||||
#[ignore_malloc_size_of = "Arc"]
|
||||
|
@ -344,6 +345,7 @@ impl Element {
|
|||
*self.is.borrow_mut() = Some(is);
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#concept-element-is-value>
|
||||
pub(crate) fn get_is(&self) -> Option<LocalName> {
|
||||
self.is.borrow().clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue