Skip to content

Commit

Permalink
Fix for #729, domready order on ie.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiomcosta committed May 28, 2010
1 parent c73799b commit 4fb7cd4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Element/Element.Event.js
Expand Up @@ -122,7 +122,7 @@ Element.NativeEvents = {
mouseover: 2, mouseout: 2, mousemove: 2, selectstart: 2, selectend: 2, //mouse movement
keydown: 2, keypress: 2, keyup: 2, //keyboard
focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, //form elements
load: 1, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window
load: 2, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window
error: 1, abort: 1, scroll: 1 //misc
};

Expand Down
12 changes: 10 additions & 2 deletions Source/Utilities/DomReady.js
Expand Up @@ -31,10 +31,18 @@ Element.Events.domready = {
document.fireEvent('domready');
};

window.addEvent('load', domready);

var repeat;
if (Browser.ie){
Element.Events.load = {
base: 'load',
onAdd: function(fn){
if (Browser.loaded) fn.call(this);
},
condition: function(){
domready();
return true;
}
};
var temp = document.createElement('div');
repeat = function(){
(Function.attempt(function(){
Expand Down

0 comments on commit 4fb7cd4

Please sign in to comment.