From 1a939e17f7961f523149603edc1980b09801f124 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 25 May 2022 02:14:12 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- pwiki2.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pwiki2.js b/pwiki2.js index 4850099..c2d3efa 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -499,7 +499,6 @@ module.BaseStore = { next: this, data: {} } }, - } @@ -973,7 +972,6 @@ object.Constructor('BasePage', { // // NOTE: by default is false unless fully cloning // - // XXX revise... // XXX HISTORY should we clear history by default... clone: function(data={}, history=false){ var [data, ...args] = [...arguments] @@ -1010,6 +1008,12 @@ object.Constructor('BasePage', { //*/ data) }, + // Create a read-only page... + // + // NOTE: all pages that are created via a read-only page are also + // read-only. + // + // XXX test .ro().virtual() combinations... // XXX EXPERIMENTAL... ro: function(data={}){ return Object.assign({ @@ -1018,6 +1022,16 @@ object.Constructor('BasePage', { __delete__: function(){ return this }, }, data) }, + + // Create a virtual page at current path... + // + // Virtual pages do not affect store data in any way but behave like + // normal pages. + // + // NOTE: .get(..) / .clone(..) will return normal non-virtual pages + // unless the target path is the same as the virtual page .path... + // + // XXX test .ro().virtual() combinations... // XXX should we be able to change path/location here??? // XXX EXPERIMENTAL... virtual: function(data={}){