mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement Body.bgColor and Document.bgColor
This commit is contained in:
parent
34070b1348
commit
16973624c8
9 changed files with 36 additions and 285 deletions
|
@ -19,6 +19,7 @@ use dom::virtualmethods::VirtualMethods;
|
|||
use dom::window::WindowHelpers;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use string_cache::Atom;
|
||||
use util::str::{self, DOMString};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -57,6 +58,11 @@ impl HTMLBodyElement {
|
|||
}
|
||||
|
||||
impl<'a> HTMLBodyElementMethods for JSRef<'a, HTMLBodyElement> {
|
||||
|
||||
// https://html.spec.whatwg.org/#dom-body-bgcolor
|
||||
make_getter!(BgColor, "bgcolor");
|
||||
make_setter!(SetBgColor, "bgcolor");
|
||||
|
||||
fn GetOnunload(self) -> Option<EventHandlerNonNull> {
|
||||
let win = window_from_node(self).root();
|
||||
win.r().GetOnunload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue