Commit f7281a1e authored by Romain Courteaud's avatar Romain Courteaud

JSlint: check more files

parent 330bfff9
...@@ -73,7 +73,10 @@ module.exports = function (grunt) { ...@@ -73,7 +73,10 @@ module.exports = function (grunt) {
} }
}, },
test: { test: {
src: ['test/embedded.js', 'test/renderjs_test.js'], src: ['test/embedded.js', 'test/renderjs_test.js',
'test/embedded.js', 'test/inject_script.js',
'test/not_declared_gadget.js',
'test/trigger_rjsready_event_on_ready_gadget.js'],
directives: { directives: {
maxlen: 79, maxlen: 79,
indent: 2, indent: 2,
......
/*jslint nomen: true*/ (function (document) {
"use strict";
// can't use RSVP here because its not loaded (neccessarily)
// can't use RSVP here because its not loaded (neccessarily) window.inject_script = function (src, resolve) {
function inject_script(src, resolve) {
// inject RSVP // inject RSVP
var script = document.createElement("script"); var script = document.createElement("script");
script.onload = function() { script.onload = function () {
resolve(); resolve();
}; };
script.src = src; script.src = src;
document.head.appendChild(script); document.head.appendChild(script);
} };
}(document));
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
.declareMethod('checkAcquisitionError', function () { .declareMethod('checkAcquisitionError', function () {
var g = this; var g = this;
return g.willFail() return g.willFail()
.push(undefined , function (e) { .push(undefined, function (e) {
g.props.element.querySelector('.acquisitionError') g.props.element.querySelector('.acquisitionError')
.innerHTML = e; .innerHTML = e;
}); });
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
var g = this; var g = this;
g.props.element.querySelector('.klass') g.props.element.querySelector('.klass')
.innerHTML = "klass" + .innerHTML = "klass" +
((g instanceof window.__RenderJSEmbeddedGadget)? " = embedded" : " != embedded"); ((g instanceof window.__RenderJSEmbeddedGadget) ?
" = embedded" : " != embedded");
}); });
}(window, rJS)); }(window, rJS));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment