aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2019-06-11 11:46:28 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2019-06-11 11:46:28 -0500
commit4cfd62ac796e4678c21da87688cb4ea0dbfdcf60 (patch)
tree3d6c4f7e5f52929c8b1284c928b519991a307b94 /components/script/dom
parentb3eed5b5bdb39138bab07ca18b77e4b622179756 (diff)
downloadservo-4cfd62ac796e4678c21da87688cb4ea0dbfdcf60.tar.gz
servo-4cfd62ac796e4678c21da87688cb4ea0dbfdcf60.zip
Added missing NavigatorId attributes
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/navigator.rs15
-rw-r--r--components/script/dom/navigatorinfo.rs12
-rw-r--r--components/script/dom/webidls/Navigator.webidl3
-rw-r--r--components/script/dom/workernavigator.rs15
4 files changed, 45 insertions, 0 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index d4666ba2aa6..8a5524b437b 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -66,6 +66,21 @@ impl NavigatorMethods for Navigator {
navigatorinfo::Product()
}
+ // https://html.spec.whatwg.org/multipage/#dom-navigator-productsub
+ fn ProductSub(&self) -> DOMString {
+ navigatorinfo::ProductSub()
+ }
+
+ // https://html.spec.whatwg.org/multipage/#dom-navigator-vendor
+ fn Vendor(&self) -> DOMString {
+ navigatorinfo::Vendor()
+ }
+
+ // https://html.spec.whatwg.org/multipage/#dom-navigator-vendorsub
+ fn VendorSub(&self) -> DOMString {
+ navigatorinfo::VendorSub()
+ }
+
// https://html.spec.whatwg.org/multipage/#dom-navigator-taintenabled
fn TaintEnabled(&self) -> bool {
navigatorinfo::TaintEnabled()
diff --git a/components/script/dom/navigatorinfo.rs b/components/script/dom/navigatorinfo.rs
index 234b75024f3..117bfce87c1 100644
--- a/components/script/dom/navigatorinfo.rs
+++ b/components/script/dom/navigatorinfo.rs
@@ -9,6 +9,18 @@ pub fn Product() -> DOMString {
DOMString::from("Gecko")
}
+pub fn ProductSub() -> DOMString {
+ DOMString::from("20100101")
+}
+
+pub fn Vendor() -> DOMString {
+ DOMString::from("")
+}
+
+pub fn VendorSub() -> DOMString {
+ DOMString::from("")
+}
+
pub fn TaintEnabled() -> bool {
false
}
diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl
index 1b4f18640ff..eb3577159fa 100644
--- a/components/script/dom/webidls/Navigator.webidl
+++ b/components/script/dom/webidls/Navigator.webidl
@@ -22,8 +22,11 @@ interface NavigatorID {
readonly attribute DOMString appVersion;
readonly attribute DOMString platform;
readonly attribute DOMString product; // constant "Gecko"
+ [Exposed=Window] readonly attribute DOMString productSub;
boolean taintEnabled(); // constant false
readonly attribute DOMString userAgent;
+ [Exposed=Window] readonly attribute DOMString vendor;
+ [Exposed=Window] readonly attribute DOMString vendorSub; // constant ""
};
// https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions
diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs
index 9753c85c3bc..6c4867eda9d 100644
--- a/components/script/dom/workernavigator.rs
+++ b/components/script/dom/workernavigator.rs
@@ -42,6 +42,21 @@ impl WorkerNavigatorMethods for WorkerNavigator {
navigatorinfo::Product()
}
+ // https://html.spec.whatwg.org/multipage/#dom-navigator-productsub
+ fn ProductSub(&self) -> DOMString {
+ navigatorinfo::ProductSub()
+ }
+
+ // https://html.spec.whatwg.org/multipage/#dom-navigator-vendor
+ fn Vendor(&self) -> DOMString {
+ navigatorinfo::Vendor()
+ }
+
+ // https://html.spec.whatwg.org/multipage/#dom-navigator-vendorsub
+ fn VendorSub(&self) -> DOMString {
+ navigatorinfo::VendorSub()
+ }
+
// https://html.spec.whatwg.org/multipage/#dom-navigator-taintenabled
fn TaintEnabled(&self) -> bool {
navigatorinfo::TaintEnabled()