forked from david-mark-llc/jessie
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ab05b6
commit 2fbf0a7
Showing
13 changed files
with
57 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
Degrades in IE 8- | ||
Degrades in IE 8- | ||
*/ | ||
|
||
var attachListener; | ||
|
||
if(html && isHostMethod(html, 'addEventListener')) { | ||
attachListener = function(el, eventType, fn) { | ||
attachListener = function(el, eventType, fn) { | ||
|
||
var listener = function(e) { | ||
fn.call(e, e); | ||
}; | ||
|
||
el.addEventListener(eventType, listener, false); | ||
el.addEventListener(eventType, listener, false); | ||
|
||
return listener; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
var cancelDefault; | ||
|
||
if(html && isHostMethod(html, 'addEventListener')) { | ||
var cancelDefault = function(e) { | ||
cancelDefault = function(e) { | ||
e.preventDefault(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
var cancelDefault; | ||
|
||
if(html && isHostMethod(html, 'attachEvent')) { | ||
var cancelDefault = function(e) { | ||
cancelDefault = function(e) { | ||
e.returnValue = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var delegateTagNameListener; | ||
|
||
if(delegateListener && getElementTagName) { | ||
delegateTagNameListener = function(el, eventType, tagName, fn) { | ||
|
||
var fnDelegate = function(target) { | ||
var targetTag | ||
|
||
|
||
return isInQuery(target, selector); | ||
} | ||
|
||
return delegateListener(el, eventType, fn, fnDelegate); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
//Uses native forEach | ||
var forEach; | ||
|
||
if (Array.prototype.forEach) { | ||
forEach = function(elements, callback, thisObject) { | ||
elements.forEach(callback, thisObject); | ||
forEach = function(elements, callback, thisObject) { | ||
elements.forEach(callback, thisObject); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
var getAncestorByTagName; | ||
|
||
if(getElementParent && getElementTagName){ | ||
getAncestorByTagName = function(el, tagName) { | ||
el = getElementParent(el); | ||
while (el && tagName && getElementTagName(el) != tagName) { | ||
el = getElementParent(el); | ||
} | ||
getAncestorByTagName = function(el, tagName) { | ||
el = getElementParent(el); | ||
while (el && tagName && getElementTagName(el) != tagName) { | ||
el = getElementParent(el); | ||
} | ||
return el; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var getDescendantsByClassName; | ||
|
||
if(globalDocument && isHostMethod(globalDocument, "getElementsByClassName") && toArray) { | ||
getDescendantsByClassName = function(el, className) { | ||
return toArray((el || document).getElementsByClassName(className)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters