mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-04 04:43:52 +00:00
feat: add reference to Window in Widget base class for convenience
This commit is contained in:
parent
d4fc8f585e
commit
50fbea45e9
@ -42,6 +42,7 @@ Widget.prototype.initialise = function(parseTreeNode,options) {
|
|||||||
this.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};
|
this.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};
|
||||||
this.variables = new this.variablesConstructor();
|
this.variables = new this.variablesConstructor();
|
||||||
this.document = options.document;
|
this.document = options.document;
|
||||||
|
this.window = this.document.parentWindow || this.document.defaultView;
|
||||||
this.attributes = {};
|
this.attributes = {};
|
||||||
this.children = [];
|
this.children = [];
|
||||||
this.domNodes = [];
|
this.domNodes = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user