Comparing version 0.3.2 to 0.3.3
@@ -9,2 +9,3 @@ /** | ||
var TOOLS_PATH = 'node_modules/accessibility-developer-tools/dist/js/axs_testing.js'; | ||
var BIND_POLYFILL_PATH = 'node_modules/phantomjs-polyfill/bind-polyfill.js'; | ||
@@ -22,2 +23,7 @@ function formatTrace(trace) { | ||
// Need to polyfill bind... | ||
webpage.onInitialized = function () { | ||
webpage.injectJs(BIND_POLYFILL_PATH); | ||
}; | ||
webpage.settings.resourceTimeout = PAGE_TIMEOUT; | ||
@@ -31,3 +37,3 @@ | ||
webpage.onResourceTimeout = function (err) { | ||
console.log('Error code:' + err.errorCode + ' ' + err.errorString + ' for ' + err.url); | ||
console.error('Error code:' + err.errorCode + ' ' + err.errorString + ' for ' + err.url); | ||
phantom.exit(1); | ||
@@ -43,3 +49,3 @@ }; | ||
if (status === 'fail') { | ||
console.error('Couldn\'t load url: ' + url); | ||
console.error('Couldn\'t load url: ' + opts.url); | ||
phantom.exit(1); | ||
@@ -89,3 +95,3 @@ } | ||
if (!ret) { | ||
system.stderr.writeLine('Audit failed'); | ||
console.error('Audit failed'); | ||
phantom.exit(1); | ||
@@ -96,5 +102,10 @@ return; | ||
console.log(JSON.stringify(ret)); | ||
phantom.exit(); | ||
// Must do crazy song and dance to get phantom to exit properly | ||
// https://github.com/ariya/phantomjs/issues/12697 | ||
webpage.close(); | ||
setTimeout(function() { | ||
phantom.exit(); | ||
}, 0); | ||
}, opts.delay * 1000); | ||
}); |
{ | ||
"name": "a11y", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Runs an accessibility audit against a URL", | ||
@@ -60,2 +60,3 @@ "license": "Apache-2.0", | ||
"phantomjs": "^1.9.10", | ||
"phantomjs-polyfill": "0.0.1", | ||
"protocolify": "^1.0.0", | ||
@@ -62,0 +63,0 @@ "update-notifier": "^0.5.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12436
195
13
+ Addedphantomjs-polyfill@0.0.1
+ Addedphantomjs-polyfill@0.0.1(transitive)