From e71afbca53c1a7db17bca5816b047fd56a2d91d4 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 23 Apr 2022 13:35:35 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- pwiki2.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pwiki2.js b/pwiki2.js index 01a8258..762b72a 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -298,6 +298,8 @@ function(name){ // XXX HISTORY do we need history management??? // XXX FUNC need to handle functions in store... +// XXX EVENT add event triggers/handlers... +// ...event handlers must be local and not propogate to the root page. var BasePage = module.BasePage = object.Constructor('BasePage', { @@ -312,6 +314,7 @@ object.Constructor('BasePage', { __location: undefined, get location(){ return this.__location ?? '/' }, + // XXX EVENT need to be able to trigger a callback/event on this... set location(path){ this.referrer = this.location var cur = this.__location = @@ -338,6 +341,7 @@ object.Constructor('BasePage', { this.__history = [] } //this.__history = (this.__history ?? []).slice() } return this.__history }, + // XXX EVENT trigger location change event.., back: function(offset=1){ var h = this.history if(h === false