mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
12 lines
324 B
JavaScript
12 lines
324 B
JavaScript
(function(window, document, framework) {
|
|
|
|
framework.trigger = function(type, data) {
|
|
window.dispatchEvent( new CustomEvent(type, data) );
|
|
};
|
|
|
|
framework.on = function(type, callback, element) {
|
|
var e = element || window;
|
|
e.addEventListener(type, callback);
|
|
};
|
|
|
|
})(this, document, this.FM = this.FM || {}); |