local-storage - 在 office word add in 中使用 openBrowserWindow 时,localstorage 不起作用
问题描述
我有一个词添加角度。我正在使用 openBrowserWindow 打开一个带有 html 文件的新窗口。Office.context.ui.openBrowserWindow("http://someurl/hello.html");
我在应用程序的 localstorage 中设置了一些值,但是当我尝试从使用 html 文件打开的新窗口中获取时,localstorage 值为 null。
笔记:
- 我可以在应用程序中访问 localstorage 值,但不能在新窗口中访问
- 应用程序和html在同一个域中
这在内部使用边缘。
解决方案
推荐阅读
- c++ - 如何使用管道将字符串从孩子发送到父母
- python - 在python中递归地转置矩阵
- java - WebDriverException:未知错误:无法将窗口状态更改为最大化,当前状态对于 MacOSX 上的 ChromeDriver v2.43 和 Chrome 70 是正常的
- ruby-on-rails - 在 Rails5.2.1 中上传文件的最佳方式
- python - 如何使用 df.rename?
- python - 如何解析特定的句子?
- spring-boot - Spring Boot 多种输入类型的一次请求映射
- javascript - 我收到“错误:eslint 因错误而终止。[object Object] using Brackets IDE
- javascript - JavaScript - 计算两个日期之间的经过时间?
- angular - Angular 4+将字符串从一个对话框传递到另一个