summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
diff options
context:
space:
mode:
authorcrowlKats <13135287+crowlKats@users.noreply.github.com>2021-05-10 12:02:47 +0200
committerGitHub <noreply@github.com>2021-05-10 12:02:47 +0200
commitdfe528198d363ebc883da84dc816bce112ecd24b (patch)
treedfa0e67521a5b0a968b57514aa02fc8f114d4132 /runtime/worker.rs
parent32ad8f77d68df04e26ecaed71bdd8d37f048218a (diff)
feat: add WebStorage API (#7819)
This commit introduces localStorage and sessionStorage.
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r--runtime/worker.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs
index b4c27b4f4..ab54e2153 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -69,6 +69,7 @@ pub struct WorkerOptions {
pub no_color: bool,
pub get_error_class_fn: Option<GetErrorClassFn>,
pub location: Option<Url>,
+ pub location_data_dir: Option<std::path::PathBuf>,
pub blob_url_store: BlobUrlStore,
}
@@ -104,6 +105,7 @@ impl MainWorker {
options.user_agent.clone(),
options.ca_data.clone(),
),
+ deno_webstorage::init(options.location_data_dir.clone()),
deno_crypto::init(options.seed),
deno_webgpu::init(options.unstable),
deno_timers::init::<Permissions>(),
@@ -291,6 +293,7 @@ mod tests {
no_color: true,
get_error_class_fn: None,
location: None,
+ location_data_dir: None,
blob_url_store: BlobUrlStore::default(),
};