mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
parent
5be084a3b6
commit
68ddc6b4ab
69 changed files with 435 additions and 461 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::utils::{WrapperCache, BindingObject, CacheableWrapper};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, str, null_string};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::bindings::codegen::NavigatorBinding;
|
||||
use script_task::{page_from_context};
|
||||
|
||||
|
@ -23,23 +23,23 @@ impl Navigator {
|
|||
}
|
||||
|
||||
pub fn DoNotTrack(&self) -> DOMString {
|
||||
str(~"unspecified")
|
||||
Some(~"unspecified")
|
||||
}
|
||||
|
||||
pub fn Vendor(&self) -> DOMString {
|
||||
str(~"") // Like Gecko
|
||||
Some(~"") // Like Gecko
|
||||
}
|
||||
|
||||
pub fn VendorSub(&self) -> DOMString {
|
||||
str(~"") // Like Gecko
|
||||
Some(~"") // Like Gecko
|
||||
}
|
||||
|
||||
pub fn Product(&self) -> DOMString {
|
||||
str(~"Gecko") // This is supposed to be constant, see webidl.
|
||||
Some(~"Gecko") // This is supposed to be constant, see webidl.
|
||||
}
|
||||
|
||||
pub fn ProductSub(&self) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
|
||||
pub fn CookieEnabled(&self) -> bool {
|
||||
|
@ -47,7 +47,7 @@ impl Navigator {
|
|||
}
|
||||
|
||||
pub fn GetBuildID(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
|
||||
pub fn JavaEnabled(&self, _rv: &mut ErrorResult) -> bool {
|
||||
|
@ -59,27 +59,27 @@ impl Navigator {
|
|||
}
|
||||
|
||||
pub fn AppName(&self) -> DOMString {
|
||||
str(~"Netscape") // Like Gecko/Webkit
|
||||
Some(~"Netscape") // Like Gecko/Webkit
|
||||
}
|
||||
|
||||
pub fn GetAppCodeName(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
str(~"Mozilla") // Like Gecko/Webkit
|
||||
Some(~"Mozilla") // Like Gecko/Webkit
|
||||
}
|
||||
|
||||
pub fn GetAppVersion(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
|
||||
pub fn GetPlatform(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
|
||||
pub fn GetUserAgent(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
|
||||
pub fn GetLanguage(&self) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
|
||||
pub fn OnLine(&self) -> bool {
|
||||
|
@ -105,4 +105,4 @@ impl BindingObject for Navigator {
|
|||
Some((*page).frame.get_ref().window as @mut CacheableWrapper)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue