experimenting whit save protocol...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-02-13 10:47:39 +03:00
parent 32bdf0c33d
commit 85551e07d0

View File

@ -916,6 +916,22 @@ var LifeCycleActions = actions.Actions({
return (this.__ready_announce_requested = (this.__ready_announce_requested || 0) + 1) return (this.__ready_announce_requested = (this.__ready_announce_requested || 0) + 1)
}], }],
// XXX revise args...
// XXX should this be here???
// XXX EXPERIMENTAL...
save: ['- System/',
doc``,
function(comment){
// XXX should this trigger the saved event pre/post outer action...
this.saved(...arguments) }],
saved: ['- System/',
doc``,
Event(function(comment){
// Base save event...
//
// Not intended for direct use.
})],
stop: ['- System/', stop: ['- System/',
doc`Stop core action doc`Stop core action
@ -931,20 +947,19 @@ var LifeCycleActions = actions.Actions({
`, `,
function(){ function(){
// browser... // browser...
if(this.__stop_handler && this.runtime.browser){ this.__stop_handler
$(window).off('beforeunload', this.__stop_handler) && this.runtime.browser
} && $(window).off('beforeunload', this.__stop_handler)
// nw... // nw...
if(this.__nw_stop_handler && this.runtime.nw){ if(this.__nw_stop_handler && this.runtime.nw){
nw.Window.get().removeAllListeners('close') nw.Window.get().removeAllListeners('close')
delete this.__nw_stop_handler delete this.__nw_stop_handler }
}
// node... // node...
if(this.__stop_handler && this.runtime.node){ this.__stop_handler
process.removeAllListeners('exit') && this.runtime.node
} && process.removeAllListeners('exit')
delete this.__ready delete this.__ready
delete this.__stop_handler delete this.__stop_handler
@ -953,8 +968,7 @@ var LifeCycleActions = actions.Actions({
&& this.logger.push('System').emit('stop') && this.logger.push('System').emit('stop')
// trigger the stopped event... // trigger the stopped event...
this.stopped() this.stopped() }],
}],
stopped: ['- System/System stopped event', stopped: ['- System/System stopped event',
doc` doc`
`, `,