diff options
author | Corey Farwell <coreyf@rwell.org> | 2015-11-28 10:12:58 -0500 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2015-11-30 18:19:07 -0500 |
commit | 320263199fbcc3aa60587f11bb757d6237e0e0aa (patch) | |
tree | 72e0e88372da01ab725a1e9fd2f91e3a5eb8d3af /components/script | |
parent | 29c42a9f78a20ddeb5aa89b79d578a039c087967 (diff) | |
download | servo-320263199fbcc3aa60587f11bb757d6237e0e0aa.tar.gz servo-320263199fbcc3aa60587f11bb757d6237e0e0aa.zip |
Implement attribute 'fgColor' on 'document'
The 'text' attribute was implemented on '<body>' in #7841
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/document.rs | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/Document.webidl | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 31f67f33801..11d38b37dd0 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -2281,6 +2281,16 @@ impl DocumentMethods for Document { self.set_body_attribute(&atom!("bgcolor"), value) } + // https://html.spec.whatwg.org/multipage/#dom-document-fgcolor + fn FgColor(&self) -> DOMString { + self.get_body_attribute(&atom!("text")) + } + + // https://html.spec.whatwg.org/multipage/#dom-document-fgcolor + fn SetFgColor(&self, value: DOMString) { + self.set_body_attribute(&atom!("text"), value) + } + // https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString, found: &mut bool) -> *mut JSObject { #[derive(JSTraceable, HeapSizeOf)] diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 863824338ed..69cb136749f 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -141,7 +141,7 @@ Document implements GlobalEventHandlers; // https://html.spec.whatwg.org/multipage/#Document-partial partial interface Document { - // [TreatNullAs=EmptyString] attribute DOMString fgColor; + [TreatNullAs=EmptyString] attribute DOMString fgColor; // https://github.com/servo/servo/issues/8715 // [TreatNullAs=EmptyString] attribute DOMString linkColor; |