diff --git a/servo/components/script/dom/document.rs b/servo/components/script/dom/document.rs index 92942012def6..a30e923cee80 100644 --- a/servo/components/script/dom/document.rs +++ b/servo/components/script/dom/document.rs @@ -2289,6 +2289,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/servo/components/script/dom/webidls/Document.webidl b/servo/components/script/dom/webidls/Document.webidl index 863824338ed3..69cb136749ff 100644 --- a/servo/components/script/dom/webidls/Document.webidl +++ b/servo/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;