mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Script: removed a few opts::get()
This commit is contained in:
parent
57205318c5
commit
42569280e2
17 changed files with 238 additions and 45 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use servo_config::opts;
|
||||
use std::borrow::Cow;
|
||||
|
||||
pub fn Product() -> DOMString {
|
||||
DOMString::from("Gecko")
|
||||
|
@ -53,8 +53,8 @@ pub fn Platform() -> DOMString {
|
|||
DOMString::from("iOS")
|
||||
}
|
||||
|
||||
pub fn UserAgent() -> DOMString {
|
||||
DOMString::from(&*opts::get().user_agent)
|
||||
pub fn UserAgent(user_agent: Cow<'static, str>) -> DOMString {
|
||||
DOMString::from(&*user_agent)
|
||||
}
|
||||
|
||||
pub fn AppVersion() -> DOMString {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue