Removing the test - since actually I can't setAttribute on the window object - DOH!

This commit is contained in:
remy 2010-08-23 17:55:18 +01:00
parent 237b024023
commit 1c87a7e8f1
2 changed files with 1 additions and 11 deletions

View File

@ -60,7 +60,7 @@ function reportData(data) {
});
}
if (typeof history.pushState === 'undefined' || !isEventSupported('popstate')) {
if (typeof history.pushState === 'undefined') {
state.className = 'fail';
} else {
state.className = 'success';

View File

@ -1,16 +1,6 @@
// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/
/*@cc_on'abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video'.replace(/\w+/g,function(n){document.createElement(n)})@*/
function isEventSupported(event, element) {
element = element || window;
var ok = 'on'+event in element;
if (ok) return ok;
element.setAttribute('on' + event, '');
ok = typeof(element['on'+event] == "function");
element.removeAttribute('on' + event);
return ok;
}
var addEvent = (function () {
if (document.addEventListener) {
return function (el, type, fn) {