Skip to content

Commit 05f21f5

Browse files
committed
$.postmessage() => pm() // jQuery is now optional
1 parent 53173f8 commit 05f21f5

File tree

2 files changed

+134
-97
lines changed

2 files changed

+134
-97
lines changed

README.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
jQuery postmessage plugin
1+
window postmessage plugin
22
=========================
33

44
Modern browsers now support cross-window/cross-domain/cross-origin messaging
@@ -23,8 +23,8 @@ IE8, IE7 and Opera 10.10.
2323
API
2424
===
2525

26-
$.postmessage(options)
27-
----------------------
26+
pm(options)
27+
-----------
2828
Send postmessage.
2929

3030
options:Map (Required)
@@ -72,8 +72,8 @@ $.postmessage(options)
7272
window location hash by setting this to true.
7373

7474

75-
$.postmessage.bind(type, fn, [origin], [hash])
76-
----------------------------------------------
75+
pm.bind(type, fn, [origin], [hash])
76+
-----------------------------------
7777
Bind postmessage handler on the current window.
7878

7979
type:String (Required)
@@ -103,16 +103,16 @@ $.postmessage.bind(type, fn, [origin], [hash])
103103
You can set this globally. However, the origin specified in
104104
the bind method will take precedence.
105105

106-
$.postmessage.origin = "http://www.xyz.com";
106+
pm.origin = "http://www.xyz.com";
107107

108108
hash:Boolean (Optional)
109109
You can force location hash polling to check for postmessages
110110
by setting this to true. This is required only if you are
111111
(forcefully) passing postmessages via the location hash.
112112

113113

114-
$.postmessage.unbind([type], [fn])
115-
---------------------------
114+
pm.unbind([type], [fn])
115+
-----------------------
116116
Remove a previously-attached postmessage handler from the current
117117
window. If type is not specified, all postmessage handlers will be
118118
removed.

0 commit comments

Comments
 (0)