Commit f7281a1e authored by Romain Courteaud's avatar Romain Courteaud

JSlint: check more files

parent 330bfff9
......@@ -73,7 +73,10 @@ module.exports = function (grunt) {
}
},
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: {
maxlen: 79,
indent: 2,
......
/*jslint nomen: true*/
(function (document) {
"use strict";
// can't use RSVP here because its not loaded (neccessarily)
function inject_script(src, resolve) {
// can't use RSVP here because its not loaded (neccessarily)
window.inject_script = function (src, resolve) {
// inject RSVP
var script = document.createElement("script");
script.onload = function() {
script.onload = function () {
resolve();
};
script.src = src;
document.head.appendChild(script);
}
};
}(document));
\ No newline at end of file
......@@ -20,7 +20,7 @@
.declareMethod('checkAcquisitionError', function () {
var g = this;
return g.willFail()
.push(undefined , function (e) {
.push(undefined, function (e) {
g.props.element.querySelector('.acquisitionError')
.innerHTML = e;
});
......@@ -29,6 +29,7 @@
var g = this;
g.props.element.querySelector('.klass')
.innerHTML = "klass" +
((g instanceof window.__RenderJSEmbeddedGadget)? " = embedded" : " != embedded");
((g instanceof window.__RenderJSEmbeddedGadget) ?
" = embedded" : " != embedded");
});
}(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