xiangjuntang / onering-desktop

Automatically exported from code.google.com/p/onering-desktop
0 stars 0 forks source link

升级到Qt-4.7后,localStorage无法访问 #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 升级Qt至4.7
2. 在js中使用HTML5的localStorage创建本地存储元素
3. 打开web inspector,点击Storage页面

What is the expected output?

应该能看见写入的数据。

What do you see instead?

无任何本地存储数据。

error console显示:
SECURITY_ERR: DOM Exception 18: An attempt was made to break through the 
security policy of the user agent.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by hongqn on 29 Sep 2010 at 2:59

GoogleCodeExporter commented 9 years ago
在 revision 0cb970c7ef 中增加了对 localStorage 
的demo,我这里可以正常运行啊,@mockee 你更新一下看看?

Original comment by hongqn on 29 Sep 2010 at 3:39

GoogleCodeExporter commented 9 years ago

Original comment by hongqn on 29 Sep 2010 at 4:00

GoogleCodeExporter commented 9 years ago
当前页面为 '/' 时会出现这个问题。比如在 revision 0cb970c7ef 
的基础上打如下patch后就会出现。

diff -r cae62eb29b35 demo/demo.py
--- a/demo/demo.py      Wed Sep 29 15:14:40 2010 +0800
+++ b/demo/demo.py      Wed Sep 29 15:31:35 2010 +0800
@@ -14,7 +14,8 @@

 urls = (
     '/init', 'init',
-    '/', 'index',
+    #'/', 'index',
+    '/', 'localstorage',
     '/create_window', 'create_window',
     '/systrayicon', 'systrayicon',
     '/systraymenu', 'systraymenu',

Original comment by hongqn on 29 Sep 2010 at 7:32

GoogleCodeExporter commented 9 years ago
没有找到原因和解决方法,暂时先放一放。需要使用localStorag
e的应用注意不要在 / 下使用。

Original comment by hongqn on 29 Sep 2010 at 7:40