mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add spec links
This commit is contained in:
parent
f039827dcd
commit
233a769c67
61 changed files with 284 additions and 87 deletions
|
@ -131,6 +131,7 @@ impl<'a> PrivateHTMLElementHelpers for &'a HTMLElement {
|
|||
}
|
||||
|
||||
impl<'a> HTMLElementMethods for &'a HTMLElement {
|
||||
// https://html.spec.whatwg.org/multipage/#the-style-attribute
|
||||
fn Style(self) -> Root<CSSStyleDeclaration> {
|
||||
self.style_decl.or_init(|| {
|
||||
let global = window_from_node(self);
|
||||
|
@ -155,6 +156,7 @@ impl<'a> HTMLElementMethods for &'a HTMLElement {
|
|||
self.dataset.or_init(|| DOMStringMap::new(self))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#handler-onload
|
||||
fn GetOnload(self) -> Option<Rc<EventHandlerNonNull>> {
|
||||
if self.is_body_or_frameset() {
|
||||
let win = window_from_node(self);
|
||||
|
@ -165,6 +167,7 @@ impl<'a> HTMLElementMethods for &'a HTMLElement {
|
|||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#handler-onload
|
||||
fn SetOnload(self, listener: Option<Rc<EventHandlerNonNull>>) {
|
||||
if self.is_body_or_frameset() {
|
||||
let win = window_from_node(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue