mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Add has_attr method to TElement.
If this is all the information the caller needs, we can get it from gecko without worrying about atomization and string conversions.
This commit is contained in:
parent
7947afc699
commit
96af00fbb9
4 changed files with 20 additions and 4 deletions
|
@ -207,6 +207,8 @@ pub trait TElement : Sized + Copy + Clone + ElementExt + PresentationalHintsSynt
|
|||
|
||||
fn get_state(&self) -> ElementState;
|
||||
|
||||
fn has_attr(&self, namespace: &Namespace, attr: &Atom) -> bool;
|
||||
|
||||
fn get_attr<'a>(&'a self, namespace: &Namespace, attr: &Atom) -> Option<&'a str>;
|
||||
|
||||
/// Properly marks nodes as dirty in response to restyle hints.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue