1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-07 03:06:56 +00:00

feat: add reference to Window in Widget base class for convenience

This commit is contained in:
saqimtiaz 2022-07-20 21:21:56 +02:00
parent d4fc8f585e
commit 50fbea45e9

View File

@ -42,6 +42,7 @@ Widget.prototype.initialise = function(parseTreeNode,options) {
this.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};
this.variables = new this.variablesConstructor();
this.document = options.document;
this.window = this.document.parentWindow || this.document.defaultView;
this.attributes = {};
this.children = [];
this.domNodes = [];