Skip to content
Permalink
Browse files

implements NavigatorLanguage

  • Loading branch information...
creativcoder committed Mar 15, 2016
1 parent 3757406 commit facf59177cf9e29f07310901cfef3fb2aa063f14
@@ -73,4 +73,9 @@ impl NavigatorMethods for Navigator {
fn Bluetooth(&self) -> Root<Bluetooth> {
self.bluetooth.or_init(|| Bluetooth::new(self.global().r()))
}

// https://html.spec.whatwg.org/multipage/#navigatorlanguage
fn Language(&self) -> DOMString {
navigatorinfo::Language()
}
}
@@ -43,3 +43,7 @@ pub fn UserAgent() -> DOMString {
pub fn AppVersion() -> DOMString {
DOMString::from("4.0")
}

pub fn Language() -> DOMString {
DOMString::from("en-US")
}
@@ -9,7 +9,7 @@ interface Navigator {
};
Navigator implements NavigatorID;
Navigator implements NavigatorBluetooth;
//Navigator implements NavigatorLanguage;
Navigator implements NavigatorLanguage;
//Navigator implements NavigatorOnLine;
//Navigator implements NavigatorContentUtils;
//Navigator implements NavigatorStorageUtils;
@@ -31,3 +31,10 @@ interface NavigatorID {
interface NavigatorBluetooth {
readonly attribute Bluetooth bluetooth;
};

// https://html.spec.whatwg.org/multipage/#navigatorlanguage
[NoInterfaceObject/*, Exposed=Window,Worker*/]
interface NavigatorLanguage {
readonly attribute DOMString language;
//readonly attribute DOMString[] languages;
};
@@ -7,5 +7,5 @@
//[Exposed=Worker]
interface WorkerNavigator {};
WorkerNavigator implements NavigatorID;
//WorkerNavigator implements NavigatorLanguage;
WorkerNavigator implements NavigatorLanguage;
//WorkerNavigator implements NavigatorOnLine;
@@ -66,4 +66,9 @@ impl WorkerNavigatorMethods for WorkerNavigator {
fn AppVersion(&self) -> DOMString {
navigatorinfo::AppVersion()
}

// https://html.spec.whatwg.org/multipage/#navigatorlanguage
fn Language(&self) -> DOMString {
navigatorinfo::Language()
}
}
@@ -7131,9 +7131,6 @@
[EventTarget interface: calling dispatchEvent(Event) on window.applicationCache with too few arguments must throw TypeError]
expected: FAIL

[Navigator interface: attribute language]
expected: FAIL

[Navigator interface: attribute languages]
expected: FAIL

@@ -7173,9 +7170,6 @@
[Navigator interface: attribute javaEnabled]
expected: FAIL

[Navigator interface: window.navigator must inherit property "language" with the proper type (7)]
expected: FAIL

[Navigator interface: window.navigator must inherit property "languages" with the proper type (8)]
expected: FAIL

@@ -7554,9 +7548,6 @@
[SharedWorker interface: attribute onerror]
expected: FAIL

[WorkerNavigator interface: attribute language]
expected: FAIL

[WorkerNavigator interface: attribute languages]
expected: FAIL

@@ -36,9 +36,6 @@
[WorkerGlobalScope interface: self must inherit property "ononline" with the proper type (6)]
expected: FAIL

[WorkerNavigator interface: attribute language]
expected: FAIL

[WorkerNavigator interface: attribute languages]
expected: FAIL

@@ -60,9 +57,6 @@
[DedicatedWorkerGlobalScope interface: self must inherit property "onmessage" with the proper type (1)]
expected: FAIL

[WorkerNavigator interface: self.navigator must inherit property "language" with the proper type (6)]
expected: FAIL

[WorkerNavigator interface: self.navigator must inherit property "languages" with the proper type (7)]
expected: FAIL

0 comments on commit facf591

Please sign in to comment.
You can’t perform that action at this time.