This file contains hidden or 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
| /* http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html */ | |
| <ol id="dropdown"> | |
| <li><a href="#">List item 1</a> | |
| <ol> | |
| <li><a href="#">List item 1.1</a></li> | |
| <li><a href="#">List item 1.2</a></li> | |
| <li><a href="#">List item 1.3</a></li> | |
| </ol> |
This file contains hidden or 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
| tests['localstorage'] = function() { | |
| try { | |
| localStorage.setItem(mod, mod); | |
| localStorage.removeItem(mod); | |
| return true; | |
| } catch(e) { | |
| return false; | |
| } | |
| }; |
This file contains hidden or 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
| tests['video'] = function() { | |
| var elem = document.createElement('video'), | |
| bool = false; | |
| // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 | |
| try { | |
| if ( bool = !!elem.canPlayType ) { | |
| bool = new Boolean(bool); | |
| bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); |
This file contains hidden or 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
| tests['textshadow'] = function() { | |
| return document.createElement('div').style.textShadow === ''; | |
| }; |
This file contains hidden or 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
| tests['multiplebgs'] = function() { | |
| setCss('background:url(https://),url(https://),red url(https://)'); | |
| return (/(url\s*\(.*?){3}/).test(mStyle.background); | |
| }; |
This file contains hidden or 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
| function testRGBA() { | |
| var elem = document.createElement("div"); | |
| elem.style.cssText = "background-color:rgba(150, 78, 9, .5);"; | |
| return !(elem.style.backgroundColor.indexOf("rgba") === -1); | |
| } |
This file contains hidden or 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
| tests['websockets'] = function() { | |
| return 'WebSocket' in window || 'MozWebSocket' in window; | |
| }; |
This file contains hidden or 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
| tests['draganddrop'] = function() { | |
| var div = document.createElement('div'); | |
| return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); | |
| }; |
This file contains hidden or 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
| tests['history'] = function() { | |
| return !!(window.history && history.pushState); | |
| }; |
This file contains hidden or 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
| tests['postmessage'] = function() { | |
| return !!window.postMessage; | |
| }; |
NewerOlder