postaljs / postal.xframe

postal.js add-on providing the ability to federate instances of postal across iframe/window boundaries
Other
37 stars 38 forks source link

Look at adding IE 8 support, if possible #2

Closed ifandelse closed 11 years ago

jbadeau commented 11 years ago

I have postal.xframe working in IE8

In postal.federation you must:

  1. replace all obj.hasOwnProperty(prop) with: Object.prototype.hasOwnProperty.call(obj, prop)

in postal.xframe you must: replace: window.addEventListener("message", plugin.routeMessage, false);

with:

if(window.addEventListener) {
    window.addEventListener("message", plugin.routeMessage, false);
}
else {
    window.attachEvent("message",plugin.routeMessage);
}

Thats it,

Cheers

jbadeau commented 11 years ago

sorry forgot.

in postal-federation you must change:

    filters: {
        in: {},
        out: {}
    },

to

    filters: {
        "in": {},
        "out": {}
    },

I'm assuming "in" is a reserved word

jbadeau commented 11 years ago

Shall I make a pull request

jbadeau commented 11 years ago

You might consider changing in & out to send & receive

ifandelse commented 11 years ago

@jbadeau - thanks for looking into this! It's been on my list of things to take care of but you might have saved me the trouble. I'm open to adding IE 8 support - feel free to submit a PR if you want, and I'll review it. If not, no worries, I'll get to it at some point

jbadeau commented 11 years ago

Alright, I'll make one in the the next few days. Cheers