开发者

Communicate opened tab with HTML5 solutions

开发者 https://www.devze.com 2023-03-17 07:00 出处:网络
Here is what i need: I have an index.html opened in my browser. I open a new window, for example, caller.html. When the caller.html loads in, it sends a message to the index开发者_开发知识库.html.

Here is what i need: I have an index.html opened in my browser. I open a new window, for example, caller.html. When the caller.html loads in, it sends a message to the index开发者_开发知识库.html.

How can i do this with html5? I thinking about Sharedworkers or Postmessage, but i didn't find a demo or sample code that i can easily implement to this feature.

I don't need crossbrowser and fallback solution.


MDN has good documentation and an example: https://developer.mozilla.org/en/DOM/window.postMessage

0

精彩评论

暂无评论...
验证码 换一张
取 消