feat: add WebStorage API (#7819)

This commit introduces localStorage and sessionStorage.
This commit is contained in:
crowlKats 2021-05-10 12:02:47 +02:00 committed by GitHub
parent 32ad8f77d6
commit dfe528198d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 819 additions and 45 deletions

View file

@ -16,6 +16,7 @@ use deno_runtime::deno_url;
use deno_runtime::deno_web;
use deno_runtime::deno_webgpu;
use deno_runtime::deno_websocket;
use deno_runtime::deno_webstorage;
use regex::Regex;
use std::collections::HashMap;
use std::env;
@ -71,6 +72,7 @@ fn create_compiler_snapshot(
op_crate_libs.insert("deno.fetch", deno_fetch::get_declaration());
op_crate_libs.insert("deno.webgpu", deno_webgpu::get_declaration());
op_crate_libs.insert("deno.websocket", deno_websocket::get_declaration());
op_crate_libs.insert("deno.webstorage", deno_webstorage::get_declaration());
op_crate_libs.insert("deno.crypto", deno_crypto::get_declaration());
// ensure we invalidate the build properly.
@ -290,6 +292,10 @@ fn main() {
"cargo:rustc-env=DENO_WEBSOCKET_LIB_PATH={}",
deno_websocket::get_declaration().display()
);
println!(
"cargo:rustc-env=DENO_WEBSTORAGE_LIB_PATH={}",
deno_webstorage::get_declaration().display()
);
println!(
"cargo:rustc-env=DENO_CRYPTO_LIB_PATH={}",
deno_crypto::get_declaration().display()