mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA).
This commit is contained in:
parent
3bb930661d
commit
6d9fccbae7
5 changed files with 44 additions and 21 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue