style: Add infrastructure to match :host.

This commit is contained in:
Emilio Cobos Álvarez 2018-03-08 22:03:42 +01:00
parent 1654f297ca
commit 9fa2618197
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
9 changed files with 159 additions and 41 deletions

View file

@ -31,6 +31,12 @@ pub trait Element: Sized + Clone + Debug {
fn parent_element(&self) -> Option<Self>;
/// Whether the parent node of this element is a shadow root.
fn parent_node_is_shadow_root(&self) -> bool;
/// The host of the containing shadow root, if any.
fn containing_shadow_host(&self) -> Option<Self>;
/// The parent of a given pseudo-element, after matching a pseudo-element
/// selector.
///