Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA).

This commit is contained in:
Glenn Watson 2015-08-17 13:50:30 +10:00
parent 3bb930661d
commit 6d9fccbae7
5 changed files with 44 additions and 21 deletions

View file

@ -28,10 +28,7 @@ pub fn Platform() -> DOMString {
}
pub fn UserAgent() -> DOMString {
match opts::get().user_agent {
Some(ref user_agent) => user_agent.clone(),
None => "".to_owned(),
}
opts::get().user_agent.clone()
}
pub fn AppVersion() -> DOMString {