Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent bug if document.createEvent fails but window.addEventListener does not #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions timesheets-playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* contact : [email protected], [email protected]
* license : MIT
* version : 0.5.1pre
* last change : 2011-05-25
* last change : 2014-12-05
*
* TODO:
* - factorize the onbegin/onend code
Expand Down Expand Up @@ -88,8 +88,8 @@
// ==========================================================================
// Generic Events
// ==========================================================================
// addEventListener should work fine everywhere except with IE<9
if (window.addEventListener) { // modern browsers
// addEventListener and createEvent should work fine everywhere except IE<9
if (window.addEventListener && document.createEvent) { // modern browsers
EVENTS.bind = function(node, type, callback) {
if (!node) return;
node.addEventListener(type, callback, false);
Expand Down Expand Up @@ -798,7 +798,7 @@ function parseAllTimeContainers() {
if (!OLDIE) {
var docElt = document.documentElement;
var ns = {
"xhtml" : "http://www.w3.org/1999/xhtml",
"xhtml" : "http://www.w3.org/1999/xhtml",
"svg" : "http://www.w3.org/2000/svg",
"smil" : docElt.getAttribute("xmlns:smil") || "http://www.w3.org/ns/SMIL"
};
Expand Down
Loading