mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Add attr_equals to TElement.
Same reasons as the previous patch.
This commit is contained in:
parent
96af00fbb9
commit
364c8e2976
4 changed files with 26 additions and 16 deletions
|
@ -369,6 +369,17 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn attr_equals(&self, namespace: &Namespace, attr: &Atom, val: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_AttrEquals(self.element,
|
||||
namespace.0.as_ptr(),
|
||||
attr.as_ptr(),
|
||||
val.as_ptr(),
|
||||
/* ignoreCase = */ false)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_attr<'a>(&'a self, namespace: &Namespace, name: &Atom) -> Option<&'a str> {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue