mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-02 07:27:35 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user