mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
37 lines
1.2 KiB
JavaScript
37 lines
1.2 KiB
JavaScript
Type.registerNamespace("Demo");
|
|
|
|
// Constructor
|
|
Demo.Section = function(element) {
|
|
|
|
Demo.Section.initializeBase(this, [element]);
|
|
}
|
|
Demo.Section.prototype = {
|
|
|
|
// Create add and remove accessors fot the complete event.
|
|
add_complete: function(handler) {
|
|
this.get_events().addHandler("complete", handler);
|
|
},
|
|
remove_complete: function(handler) {
|
|
this.get_events().removeHandler("complete", handler);
|
|
},
|
|
|
|
// Create a function to raise the complete event.
|
|
raiseComplete: function() {
|
|
var h = this.get_events().getHandler('complete');
|
|
if (h) h(this);
|
|
},
|
|
|
|
// Release resources before control is disposed.
|
|
dispose: function() {
|
|
var element = this.get_element();
|
|
$clearHandlers(element);
|
|
Demo.Section.callBaseMethod(this, 'dispose');
|
|
}
|
|
}
|
|
Demo.Section.registerClass('Demo.Section', Sys.UI.Control);
|
|
|
|
// Since this script is not loaded by System.Web.Handlers.ScriptResourceHandler
|
|
// invoke Sys.Application.notifyScriptLoaded to notify ScriptManager
|
|
// that this is the end of the script.
|
|
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
|