mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
More work and clean-up on JSHint compliance.
This commit is contained in:
parent
c9c111070a
commit
8639051081
8 changed files with 24 additions and 24 deletions
|
@ -12,9 +12,5 @@
|
||||||
"eqnull": true,
|
"eqnull": true,
|
||||||
"loopfunc": true,
|
"loopfunc": true,
|
||||||
"boss": true,
|
"boss": true,
|
||||||
"shadow": true,
|
"shadow": true
|
||||||
"globals": {
|
|
||||||
"Event": true,
|
|
||||||
"MouseEvent": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,9 @@
|
||||||
// Node.js emulation layer of browser based environment, based on node-canvas
|
// Node.js emulation layer of browser based environment, based on node-canvas
|
||||||
// and jsdom.
|
// and jsdom.
|
||||||
|
|
||||||
/*global document:true, window:true, navigator:true, HTMLCanvasElement:true, Image:true */
|
/* global document:true, window:true, navigator:true, HTMLCanvasElement:true,
|
||||||
|
Image:true */
|
||||||
|
|
||||||
var jsdom = require('jsdom'),
|
var jsdom = require('jsdom'),
|
||||||
// Node Canvas library: https://github.com/learnboost/node-canvas
|
// Node Canvas library: https://github.com/learnboost/node-canvas
|
||||||
Canvas = require('canvas'),
|
Canvas = require('canvas'),
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
* @class The Event object is the base class for any of the other event types,
|
* @class The Event object is the base class for any of the other event types,
|
||||||
* such as {@link MouseEvent}, {@link ToolEvent} and {@link KeyEvent}.
|
* such as {@link MouseEvent}, {@link ToolEvent} and {@link KeyEvent}.
|
||||||
*/
|
*/
|
||||||
|
/* global Event: true */
|
||||||
var Event = Base.extend(/** @lends Event# */{
|
var Event = Base.extend(/** @lends Event# */{
|
||||||
_class: 'Event',
|
_class: 'Event',
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
*
|
*
|
||||||
* @extends Event
|
* @extends Event
|
||||||
*/
|
*/
|
||||||
|
/* global MouseEvent: true */
|
||||||
var MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
var MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
||||||
_class: 'MouseEvent',
|
_class: 'MouseEvent',
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ var Http = {
|
||||||
request: function(method, url, callback, async) {
|
request: function(method, url, callback, async) {
|
||||||
// Code borrowed from Coffee Script and extended:
|
// Code borrowed from Coffee Script and extended:
|
||||||
async = (async === undefined) ? true : async;
|
async = (async === undefined) ? true : async;
|
||||||
var xhrConstructor = window.ActiveXObject || XMLHttpRequest;
|
var ctor = window.ActiveXObject || XMLHttpRequest,
|
||||||
var xhr = new xhrConstructor('Microsoft.XMLHTTP');
|
xhr = new ctor('Microsoft.XMLHTTP');
|
||||||
xhr.open(method.toUpperCase(), url, async);
|
xhr.open(method.toUpperCase(), url, async);
|
||||||
if ('overrideMimeType' in xhr)
|
if ('overrideMimeType' in xhr)
|
||||||
xhr.overrideMimeType('text/plain');
|
xhr.overrideMimeType('text/plain');
|
||||||
|
|
Loading…
Reference in a new issue