Skip to content

Commit 1c87a7e

Browse files
committed
Removing the test - since actually I can't setAttribute on the window object - DOH!
1 parent 237b024 commit 1c87a7e

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

demos/history.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
});
6161
}
6262

63-
if (typeof history.pushState === 'undefined' || !isEventSupported('popstate')) {
63+
if (typeof history.pushState === 'undefined') {
6464
state.className = 'fail';
6565
} else {
6666
state.className = 'success';

js/h5utils.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/
22
/*@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)})@*/
33

4-
function isEventSupported(event, element) {
5-
element = element || window;
6-
var ok = 'on'+event in element;
7-
if (ok) return ok;
8-
element.setAttribute('on' + event, '');
9-
ok = typeof(element['on'+event] == "function");
10-
element.removeAttribute('on' + event);
11-
return ok;
12-
}
13-
144
var addEvent = (function () {
155
if (document.addEventListener) {
166
return function (el, type, fn) {

0 commit comments

Comments
 (0)