From 50fbea45e97fda0bb2701bea68917f0de6ef063e Mon Sep 17 00:00:00 2001 From: saqimtiaz Date: Wed, 20 Jul 2022 21:21:56 +0200 Subject: [PATCH] feat: add reference to Window in Widget base class for convenience --- core/modules/widgets/widget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 0aefbada8..a4978db67 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -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 = [];