Skip to content

Commit

Permalink
Merge pull request #10 from extremeprog-com/fix-jest-fireevent-failing
Browse files Browse the repository at this point in the history
Fix Core FireEvent failing when running Jest tests
  • Loading branch information
myfoxtail authored Nov 2, 2017
2 parents 4c51d12 + c5d3f77 commit 244aa3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -732,25 +732,25 @@ if(typeof window != 'undefined') {
old_onresize = window.onresize || document.body.onresize;
}

FireEvent(new DOM_Init());
Core.FireEvent(new DOM_Init());

FireEvent(new DOM_Changed({element: document.body}));
Core.FireEvent(new DOM_Changed({element: document.body}));

window.onscroll = document.body.onscroll = function(event) {
if(old_onscroll) {
old_onscroll(event);
}
FireEvent(new Window_Scroll({dom_event: event}));
Core.FireEvent(new Window_Scroll({dom_event: event}));
};
window.onresize = document.body.onresize = function(event) {
if(old_onresize) {
old_onresize(event);
}
FireEvent(new Window_Resize({dom_event: event}));
Core.FireEvent(new Window_Resize({dom_event: event}));
};

window.onbeforeunload = function(event) {
FireEvent(new DOM_Unload({dom_event: event}));
Core.FireEvent(new DOM_Unload({dom_event: event}));
};

});
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core-os",
"version": "0.1.5",
"version": "0.1.6",
"homepage": "https://github.com/extremeprog-com/core",
"authors": [
"(Oleg Sergienko <[email protected]>)"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core-os",
"version": "0.1.5",
"version": "0.1.6",
"description": "Awesome event oriented javascript framework",
"main": "Core.js",
"directories": {
Expand Down

0 comments on commit 244aa3e

Please sign in to comment.