openfl
Version:
A fast, productive library for 2D cross-platform development.
68 lines (50 loc) • 2.05 kB
JavaScript
// Class: openfl.events.UncaughtErrorEvents
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $hxEnums = require("./../../hxEnums_stub").default;
var $import = require("./../../import_stub").default;
var $extend = require("./../../extend_stub").default;
function openfl_events_EventDispatcher() {return require("./../../openfl/events/EventDispatcher");}
// Constructor
var UncaughtErrorEvents = function() {
this.__enabled = true;
(openfl_events_EventDispatcher().default).call(this);
}
// Meta
UncaughtErrorEvents.__name__ = "openfl.events.UncaughtErrorEvents";
UncaughtErrorEvents.__isInterface__ = false;
UncaughtErrorEvents.__super__ = (openfl_events_EventDispatcher().default);
UncaughtErrorEvents.prototype = $extend((openfl_events_EventDispatcher().default).prototype, {
addEventListener: function(type,listener,useCapture,priority,useWeakReference) {
if(useWeakReference == null) {
useWeakReference = false;
}
if(priority == null) {
priority = 0;
}
if(useCapture == null) {
useCapture = false;
}
(openfl_events_EventDispatcher().default).prototype.addEventListener.call(this,type,listener,useCapture,priority,useWeakReference);
if(this.__eventMap.exists("uncaughtError")) {
this.__enabled = true;
}
},
removeEventListener: function(type,listener,useCapture) {
if(useCapture == null) {
useCapture = false;
}
(openfl_events_EventDispatcher().default).prototype.removeEventListener.call(this,type,listener,useCapture);
if(!this.__eventMap.exists("uncaughtError")) {
this.__enabled = false;
}
}
});
UncaughtErrorEvents.prototype.__class__ = UncaughtErrorEvents.prototype.constructor = $hxClasses["openfl.events.UncaughtErrorEvents"] = UncaughtErrorEvents;
// Init
// Statics
// Export
exports.default = UncaughtErrorEvents;