mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add spec links
This commit is contained in:
parent
f039827dcd
commit
233a769c67
61 changed files with 284 additions and 87 deletions
|
@ -35,20 +35,24 @@ impl DOMStringMap {
|
|||
|
||||
// https://html.spec.whatwg.org/#domstringmap
|
||||
impl<'a> DOMStringMapMethods for &'a DOMStringMap {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-additem
|
||||
fn NamedCreator(self, name: DOMString, value: DOMString) -> ErrorResult {
|
||||
self.NamedSetter(name, value)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-removeitem
|
||||
fn NamedDeleter(self, name: DOMString) {
|
||||
let element = self.element.root();
|
||||
element.r().delete_custom_attr(name)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-setitem
|
||||
fn NamedSetter(self, name: DOMString, value: DOMString) -> ErrorResult {
|
||||
let element = self.element.root();
|
||||
element.r().set_custom_attr(name, value)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-nameditem
|
||||
fn NamedGetter(self, name: DOMString, found: &mut bool) -> DOMString {
|
||||
let element = self.element.root();
|
||||
match element.r().get_custom_attr(name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue