mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
feat: add userAgent property to Navigator's prototype (#14415)
This commit is contained in:
parent
20ee3110d8
commit
f82a79ffdb
10 changed files with 29 additions and 12 deletions
|
@ -20,6 +20,7 @@ pub struct BootstrapOptions {
|
|||
/// Sets `Deno.version.typescript` in JS runtime.
|
||||
pub ts_version: String,
|
||||
pub unstable: bool,
|
||||
pub user_agent: String,
|
||||
}
|
||||
|
||||
impl BootstrapOptions {
|
||||
|
@ -42,6 +43,7 @@ impl BootstrapOptions {
|
|||
"ppid": ppid(),
|
||||
"target": env!("TARGET"),
|
||||
"v8Version": deno_core::v8_version(),
|
||||
"userAgent": self.user_agent,
|
||||
});
|
||||
serde_json::to_string_pretty(&payload).unwrap()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue