文件名称:origin-storage:跨域访问的同源存储(IndexedDBWebSQLlocalStorage)
文件大小:111KB
文件格式:ZIP
更新时间:2024-06-05 17:51:37
cross-database localstorage indexeddb websql localforage
原始存储 一个用于跨域访问的同源存储,它基于localForage,并支持IndexedDB,WebSQL和localStorage。 origin-storage在不支持IndexedDB或WebSQL的浏览器中使用localStorage。 并且不支持Safari。 目录 动机 当不同的网站域需要相同来源的存储容器时,我们必须使用iframe的相同来源策略Web本地存储解决方案。 localForage是一个出色的存储库,它支持IndexedDB,WebSQL和localStorage,但不能直接解决此问题。 这就是为什么我们有此库用于基于localForage的同源存储。 安装 yarn add origin-storage 用法和示例 在http://localhost:9000/storage.js上使用OriginStorage : import { OriginSt
【文件预览】:
origin-storage-master
----.eslintrc(1KB)
----example()
--------storage.html(238B)
--------package.json(524B)
--------index.html(239B)
--------src()
--------tsconfig.json(6KB)
--------webpack.config.js(519B)
--------README.md(133B)
----rollup.config.js(1KB)
----package.json(2KB)
----.github()
--------workflows()
----test()
--------index.test.ts(5KB)
----.prettierrc(52B)
----LICENSE(1KB)
----global.d.ts(29B)
----src()
--------interface.ts(2KB)
--------originStorageClient.ts(5KB)
--------originStorage.ts(5KB)
--------constant.ts(417B)
--------index.ts(152B)
----.npmignore(8B)
----tsconfig.json(5KB)
----.gitignore(2KB)
----lib()
--------index.js(187B)
----README.md(3KB)
----yarn.lock(228KB)
----.eslintignore(16B)
----.editorconfig(355B)
----index.ts(23B)