mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
utils
This commit is contained in:
11
js/framework/framework-utilities.js
Normal file
11
js/framework/framework-utilities.js
Normal file
@ -0,0 +1,11 @@
|
||||
(function(window, document, framework) {
|
||||
|
||||
framework.trigger = function(type, data) {
|
||||
window.dispatchEvent( new CustomEvent(type, data) );
|
||||
};
|
||||
|
||||
framework.on = function(type, callback) {
|
||||
window.addEventListener(type, callback);
|
||||
};
|
||||
|
||||
})(this, document, this.FM = this.FM || {});
|
||||
Reference in New Issue
Block a user