Closed atwellpub closed 9 years ago
Whats the error? I dont have IE to see this
Looks like IE 9+ doesnt have the customEvent js.
Might need a browser type/version check and revert to this: http://stackoverflow.com/questions/19345392/why-arent-my-parameters-getting-passed-through-to-a-dispatched-event/19345563#19345563
// change this
pageFirstView: function(page_seen_count) {
var page_first_view = new CustomEvent("inbound_analytics_page_first_view", {
detail: {
count: 1,
time: new Date(),
},
bubbles: true,
cancelable: true
}
);
// to
var evt = document.createEvent("CustomEvent");
evt.initCustomEvent('inbound_analytics_page_first_view', false, false, {
count: 1,
time: new Date(),
});
And test out in IE. The syntax might be wrong on the second. look here for that http://stackoverflow.com/questions/19345392/why-arent-my-parameters-getting-passed-through-to-a-dispatched-event/19345563#19345563
Hey David where do you think the patch should go. And how should it read in psedo-code? eg:
"If browser is IE 11 then do this"
pageFirstView: function(page_seen_count) { var page_first_view = new CustomEvent("inbound_analytics_page_first_view", { detail: { count: 1, time: new Date(), }, bubbles: true, cancelable: true } );
Site repeatable: http://www.runmags.com