aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/document.rs10
-rw-r--r--components/script/dom/webidls/Document.webidl2
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;