mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #7246 - glennw:platform-ua, r=larsbergstrom
Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA). <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7246) <!-- Reviewable:end -->
This commit is contained in:
commit
f340900c38
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