Skip to content

Commit

Permalink
IE8/9 Fix take 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
ifandelse committed May 12, 2014
1 parent 6a75c60 commit 649c922
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/postal.xframe.js
Expand Up @@ -84,8 +84,13 @@
if (!this.options.isWorker && !_envIsWorker) {
args.push(this.options.origin);
}
// Thanks IE, we appreciate it. :-(
if (noPostMessageApply) {
this.target.postMessage(args[0], args[1]);
if (args.length === 1) {
this.target.postMessage(args[0]);
} else {
this.target.postMessage(args[0], args[1]);
}
} else {
this.target.postMessage.apply(context, args);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/postal.xframe.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/xframe.js
Expand Up @@ -73,8 +73,13 @@ var XFRAME = "xframe",
if (!this.options.isWorker && !_envIsWorker) {
args.push(this.options.origin);
}
// Thanks IE, we appreciate it. :-(
if (noPostMessageApply) {
this.target.postMessage(args[0], args[1]);
if (args.length === 1) {
this.target.postMessage(args[0]);
} else {
this.target.postMessage(args[0], args[1]);
}
} else {
this.target.postMessage.apply(context, args);
}
Expand Down

0 comments on commit 649c922

Please sign in to comment.