some linting of settings.js

v1.18.x
psychobunny 11 years ago
parent c3e4c7dea1
commit f2a692add7

@ -1,3 +1,6 @@
"use strict";
/*global define, app, socket*/
define(function () { define(function () {
var DEFAULT_PLUGINS = [ var DEFAULT_PLUGINS = [
@ -58,7 +61,9 @@ define(function () {
createElement: function (tagName, data, text) { createElement: function (tagName, data, text) {
var element = document.createElement(tagName); var element = document.createElement(tagName);
for (var k in data) { for (var k in data) {
element.setAttribute(k, data[k]); if (data.hasOwnProperty(k)) {
element.setAttribute(k, data[k]);
}
} }
if (text) { if (text) {
element.appendChild(document.createTextNode(text)); element.appendChild(document.createTextNode(text));
@ -103,7 +108,7 @@ define(function () {
if (type != null) { if (type != null) {
data.type = type; data.type = type;
} }
element = $(helper.createElement(tagName || 'input', data)) element = $(helper.createElement(tagName || 'input', data));
} }
element.data('type', type); element.data('type', type);
helper.initElement(element); helper.initElement(element);

Loading…
Cancel
Save