From e45b7cd66b1f1fb573bc734584b6dc8348e67024 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 8 Oct 2014 11:35:20 +0100 Subject: [PATCH] Fix MKWS-280: We should not define globals named "widget" and "team". Rename the widget function to mkws.makeWidget --- src/mkws-core.js | 2 +- src/mkws-widget.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mkws-core.js b/src/mkws-core.js index b5c4cde..3a4fa5b 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -466,7 +466,7 @@ mkws.log("Using window.name '" + window.name + "'"); } var oldHTML = this.innerHTML; - var myWidget = makeWidget($, myTeam, type, this); + var myWidget = mkws.makeWidget($, myTeam, type, this); myTeam.addWidget(myWidget); var newHTML = this.innerHTML; if (newHTML !== oldHTML) { diff --git a/src/mkws-widget.js b/src/mkws-widget.js index d968743..5476796 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -1,5 +1,5 @@ // Factory function for widget objects. -function makeWidget($, team, type, node) { +mkws.makeWidget = function($, team, type, node) { // Static register of attributes that do not contribute to config var ignoreAttrs = { id:1, 'class':1, style:1, name:1, action:1, type:1, size:1, -- 1.7.10.4