Make global explicit in module scope

This is mainly because tests don't inferr that
global variables are just properties of the window
object, as browsers do, but it also makes this
more explicit.
This commit is contained in:
Tom Byers
2019-09-02 14:24:02 +01:00
parent bbb1ca33e9
commit a0d39496b9

View File

@@ -1,8 +1,8 @@
(function(Modules) {
(function(global) {
"use strict";
var queues = {};
var dd = new diffDOM();
var dd = new global.diffDOM();
var getRenderer = $component => response => dd.apply(
$component.get(0),
@@ -43,7 +43,7 @@
);
};
Modules.UpdateContent = function() {
global.GOVUK.Modules.UpdateContent = function() {
this.start = component => poll(
getRenderer($(component)),
@@ -55,4 +55,4 @@
};
})(window.GOVUK.Modules);
})(window);