mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Simply use document.write() for script loading, as load.js seems not ready for primetime yet (it magically half-broke QUnit on Safari).
This commit is contained in:
parent
de797aa0fe
commit
4680283ce7
29 changed files with 135 additions and 220 deletions
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var vector = new Point(document.size.height, 0);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
// http://en.wikipedia.org/wiki/Lenna
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
document.currentStyle.fillColor = 'black';
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var mousePoint = document.bounds.center;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var layer = document.activeLayer;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var balls = [];
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var point = document.bounds.center;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var center = document.bounds.center;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var letterPath = new Path(
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var count = 0;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var path = new Path.Rectangle([50, 50], [100, 100]);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var count = 0;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var path = new Path.Circle(new Point(), 100);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var point = new Point(document.size) / 2;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var paths = [];
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var path = new Path([100, 150], [150, 200], [200, 150]);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
document.currentStyle = {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var path;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var path;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var path;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
tool.fixedDistance = 30;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Example</title>
|
||||
<script type="text/javascript">var loadBase = '../../'</script>
|
||||
<script type="text/javascript" src="../../lib/load.js"></script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/* Copyright (c) 2010 Chris O'Hara <cohara87@gmail.com>. MIT Licensed *///Include the chain.js microframework (http://github.com/chriso/chain.js)
|
||||
function loadScript(a,b,c){var d=document.createElement("script");d.type="text/javascript",d.src=a,d.onload=b,d.onerror=c,d.onreadystatechange=function(){var a=this.readyState;if(a==="loaded"||a==="complete")d.onreadystatechange=null,b()},head.insertBefore(d,head.firstChild)}(function(a){a=a||{};var b={},c,d;c=function(a,d,e){var f=a.halt=!1;a.error=function(a){throw a},a.next=function(c){c&&(f=!1);if(!a.halt&&d&&d.length){var e=d.shift(),g=e.shift();f=!0;try{b[g].apply(a,[e,e.length,g])}catch(h){a.error(h)}}return a};for(var g in b){if(typeof a[g]==="function")continue;(function(e){a[e]=function(){var g=Array.prototype.slice.call(arguments);if(e==="onError"){if(d){b.onError.apply(a,[g,g.length]);return a}var h={};b.onError.apply(h,[g,g.length]);return c(h,null,"onError")}g.unshift(e);if(!d)return c({},[g],e);a.then=a[e],d.push(g);return f?a:a.next()}})(g)}e&&(a.then=a[e]),a.call=function(b,c){c.unshift(b),d.unshift(c),a.next(!0)};return a.next()},d=a.addMethod=function(d){var e=Array.prototype.slice.call(arguments),f=e.pop();for(var g=0,h=e.length;g<h;g++)typeof e[g]==="string"&&(b[e[g]]=f);--h||(b["then"+d.substr(0,1).toUpperCase()+d.substr(1)]=f),c(a)},d("chain",function(a){var b=this,c=function(){if(!b.halt){if(!a.length)return b.next(!0);try{null!=a.shift().call(b,c,b.error)&&c()}catch(d){b.error(d)}}};c()}),d("run",function(a,b){var c=this,d=function(){c.halt||--b||c.next(!0)},e=function(a){c.error(a)};for(var f=0,g=b;!c.halt&&f<g;f++)null!=a[f].call(c,d,e)&&d()}),d("defer",function(a){var b=this;setTimeout(function(){b.next(!0)},a.shift())}),d("onError",function(a,b){var c=this;this.error=function(d){c.halt=!0;for(var e=0;e<b;e++)a[e].call(c,d)}})})(this),addMethod("load",function(a,b){for(var c=[],d=0;d<b;d++)(function(b){c.push(function(c,d){loadScript(a[b],c,d)})})(d);this.call("run",c)});var head=document.getElementsByTagName("head")[0]||document.documentElement
|
139
src/load.js
139
src/load.js
|
@ -16,134 +16,83 @@
|
|||
//
|
||||
// NOTE: Any files added as includes to paper.js also need to be listed here
|
||||
|
||||
var id = '?' + Math.random(),
|
||||
loadBase = window.loadBase || '',
|
||||
loadTests = window.loadTests,
|
||||
loaded = false;
|
||||
var loadBase = window.loadBase || '',
|
||||
loadTests = window.loadTests;
|
||||
|
||||
function addEvent(obj, type, fn) {
|
||||
if (obj.addEventListener) {
|
||||
obj.addEventListener(type, fn, false);
|
||||
} else if (obj.attachEvent) {
|
||||
obj.attachEvent('on'+ type, fn);
|
||||
}
|
||||
}
|
||||
|
||||
addEvent(window, 'load', function() {
|
||||
loaded = true;
|
||||
});
|
||||
|
||||
// Load Paper.js library bit by bit, in chunks defined by inderdependent files.
|
||||
var items = [
|
||||
[
|
||||
var sources = [
|
||||
'lib/bootstrap.js',
|
||||
'lib/parse-js.js'
|
||||
], [
|
||||
'src/paper.js'
|
||||
], [
|
||||
'lib/parse-js.js',
|
||||
|
||||
'src/paper.js',
|
||||
|
||||
'src/basic/Point.js',
|
||||
'src/basic/Size.js',
|
||||
'src/basic/Rectangle.js',
|
||||
'src/basic/Matrix.js',
|
||||
'src/basic/Line.js'
|
||||
], [
|
||||
'src/basic/Line.js',
|
||||
|
||||
'src/document/DocumentView.js',
|
||||
'src/document/Document.js',
|
||||
'src/document/Symbol.js'
|
||||
], [
|
||||
'src/item/Item.js'
|
||||
], [
|
||||
'src/document/Symbol.js',
|
||||
|
||||
'src/item/Item.js',
|
||||
'src/item/Group.js',
|
||||
'src/item/Raster.js',
|
||||
'src/item/PlacedSymbol.js',
|
||||
'src/item/PathStyle.js',
|
||||
'src/path/PathItem.js',
|
||||
'src/path/Segment.js',
|
||||
'src/path/Curve.js'
|
||||
], [
|
||||
// Requires Group
|
||||
'src/path/Curve.js',
|
||||
|
||||
'src/item/Layer.js',
|
||||
// Requires PathItem
|
||||
'src/path/Path.js',
|
||||
'src/path/CompoundPath.js'
|
||||
], [
|
||||
'src/path/CompoundPath.js',
|
||||
|
||||
'src/path/Path.Constructors.js',
|
||||
'src/color/Color.js'
|
||||
], [
|
||||
// Requires Color
|
||||
|
||||
'src/color/Color.js',
|
||||
'src/color/RGBColor.js',
|
||||
'src/color/GrayColor.js',
|
||||
'src/color/GradientColor.js',
|
||||
'src/color/Gradient.js',
|
||||
'src/color/GradientStop.js'
|
||||
], [
|
||||
'src/color/GradientStop.js',
|
||||
|
||||
'src/tool/ToolEvent.js',
|
||||
'src/tool/ToolHandler.js'
|
||||
], [
|
||||
// Requires ToolHandler
|
||||
'src/tool/ToolHandler.js',
|
||||
'src/tool/Tool.js',
|
||||
|
||||
'src/util/BlendMode.js',
|
||||
'src/util/CanvasProvider.js',
|
||||
'src/util/Numerical.js',
|
||||
'src/util/Events.js'
|
||||
], [
|
||||
// Requires Events
|
||||
'src/util/Events.js',
|
||||
'src/util/PaperScript.js'
|
||||
]
|
||||
];
|
||||
|
||||
// Load unit tests after library if asked to do so
|
||||
if (loadTests) {
|
||||
items.push(
|
||||
[
|
||||
sources.push(
|
||||
'test/lib/qunit/qunit.js',
|
||||
'test/lib/test_functions.js'
|
||||
],
|
||||
// Load each test seperately
|
||||
[ 'test/tests/Point.js' ],
|
||||
[ 'test/tests/Size.js' ],
|
||||
[ 'test/tests/Rectangle.js' ],
|
||||
[ 'test/tests/Color.js' ],
|
||||
[ 'test/tests/Document.js' ],
|
||||
[ 'test/tests/Item.js' ],
|
||||
[ 'test/tests/Layer.js' ],
|
||||
[ 'test/tests/Group.js' ],
|
||||
[ 'test/tests/Segment.js' ],
|
||||
[ 'test/tests/Path.js' ],
|
||||
[ 'test/tests/Path_Shapes.js' ],
|
||||
[ 'test/tests/Path_Drawing_Commands.js' ],
|
||||
[ 'test/tests/Path_Bounds.js' ],
|
||||
[ 'test/tests/Path_Length.js' ],
|
||||
[ 'test/tests/PathStyle.js' ],
|
||||
[ 'test/tests/PlacedSymbol.js' ]
|
||||
'test/lib/test_functions.js',
|
||||
'test/tests/Point.js',
|
||||
'test/tests/Size.js',
|
||||
'test/tests/Rectangle.js',
|
||||
'test/tests/Color.js',
|
||||
'test/tests/Document.js',
|
||||
'test/tests/Item.js',
|
||||
'test/tests/Layer.js',
|
||||
'test/tests/Group.js',
|
||||
'test/tests/Segment.js',
|
||||
'test/tests/Path.js',
|
||||
'test/tests/Path_Shapes.js',
|
||||
'test/tests/Path_Drawing_Commands.js',
|
||||
'test/tests/Path_Bounds.js',
|
||||
'test/tests/Path_Length.js',
|
||||
'test/tests/PathStyle.js',
|
||||
'test/tests/PlacedSymbol.js'
|
||||
);
|
||||
}
|
||||
|
||||
// This bit of code is required to convert the above lists of grouped sources
|
||||
// to the odd load.js format:
|
||||
var loader = null;
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var sources = items[i];
|
||||
for (var j = 0; j < sources.length; j++) {
|
||||
sources[j] = loadBase + sources[j] + id;
|
||||
for (var i = 0; i < sources.length; i++) {
|
||||
document.write('<script type="text/javascript" src="' + loadBase
|
||||
+ sources[i] + '"></script>');
|
||||
}
|
||||
if (!loader) {
|
||||
loader = load.apply(window, sources);
|
||||
} else {
|
||||
loader.then.apply(loader, sources);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// At the end of loading, run PaperScript and QUnit if required
|
||||
loader.thenRun(
|
||||
function() {
|
||||
if (loaded) {
|
||||
PaperScript.load();
|
||||
if (loadTests) {
|
||||
QUnit.load();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -3,12 +3,7 @@
|
|||
<head>
|
||||
<title>Paper.js Tests</title>
|
||||
<link rel="stylesheet" href="lib/qunit/qunit.css" type="text/css" media="screen">
|
||||
<!-- Paper.js Loading -->
|
||||
<script type="text/javascript">
|
||||
var loadBase = '../',
|
||||
loadTests = true;
|
||||
</script>
|
||||
<script type="text/javascript" src="../lib/load.js"></script>
|
||||
<script type="text/javascript"> var loadBase = '../', loadTests = true; </script>
|
||||
<script type="text/javascript" src="../src/load.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -612,7 +612,28 @@ extend(QUnit, {
|
|||
});
|
||||
},
|
||||
|
||||
load: function() {
|
||||
// Logging callbacks; all receive a single argument with the listed properties
|
||||
// run test/logs.html for any related changes
|
||||
begin: function() {},
|
||||
// done: { failed, passed, total, runtime }
|
||||
done: function() {},
|
||||
// log: { result, actual, expected, message }
|
||||
log: function() {},
|
||||
// testStart: { name }
|
||||
testStart: function() {},
|
||||
// testDone: { name, failed, passed, total }
|
||||
testDone: function() {},
|
||||
// moduleStart: { name }
|
||||
moduleStart: function() {},
|
||||
// moduleDone: { name, failed, passed, total }
|
||||
moduleDone: function() {}
|
||||
});
|
||||
|
||||
if ( typeof document === "undefined" || document.readyState === "complete" ) {
|
||||
config.autorun = true;
|
||||
}
|
||||
|
||||
addEvent(window, "load", function() {
|
||||
QUnit.begin({});
|
||||
|
||||
// Initialize the config, saving the execution queue
|
||||
|
@ -675,31 +696,8 @@ extend(QUnit, {
|
|||
if (config.autostart) {
|
||||
QUnit.start();
|
||||
}
|
||||
},
|
||||
|
||||
// Logging callbacks; all receive a single argument with the listed properties
|
||||
// run test/logs.html for any related changes
|
||||
begin: function() {},
|
||||
// done: { failed, passed, total, runtime }
|
||||
done: function() {},
|
||||
// log: { result, actual, expected, message }
|
||||
log: function() {},
|
||||
// testStart: { name }
|
||||
testStart: function() {},
|
||||
// testDone: { name, failed, passed, total }
|
||||
testDone: function() {},
|
||||
// moduleStart: { name }
|
||||
moduleStart: function() {},
|
||||
// moduleDone: { name, failed, passed, total }
|
||||
moduleDone: function() {}
|
||||
});
|
||||
|
||||
if ( typeof document === "undefined" || document.readyState === "complete" ) {
|
||||
config.autorun = true;
|
||||
}
|
||||
|
||||
addEvent(window, "load", QUnit.load);
|
||||
|
||||
function done() {
|
||||
config.autorun = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue