-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcrash.js
66 lines (64 loc) · 1.39 KB
/
crash.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
define(["dojo"], function(dojo){
dojo.crash = function(x){
// summary:
// Instantly crash IE6. That'll teach em'
//
// description:
// Instantly crash IE6. Direct port of:
// http://plugins.jquery.com/project/crash
//
// Super userful.
//
// x: Anything?
// Just pass anything. Or don't. It will still crash.
//
// example:
// | dojo.crash();
//
// example:
// Passing an argument:
// | dojo.crash("anArgument");
//
// example:
// Passing an object:
// | dojo.crash({ a:"b" });
//
// example:
// Passing a number:
// | dojo.crash(1);
//
// example:
// Passing an array:
// | dojo.crash([1,2,3]);
//
// example:
// Crashing at the end of an XHR call:
// | dojo.xhrGet({
// | url:"/foo",
// | load: dojo.crash
// | });
//
// example:
// Crashing onclick:
// | dojo.connect(node, "onclick", dojo, "crash");
//
// example:
// Crash after an animation
// | dojo.animateProperty({ node: node, onEnd: dojo.crash, properties:{ opacity:1 } }).play();
//
// example:
// Alternate onclick crash, using dojo.query()
// | dojo.query(".badlink").onclick(dojo.crash);
//
// example:
// Crash randomly:
// | setInterval(function(){
// | if(Math.random() * 100 > 75){
// | dojo.crash();
// | }
// | }, 1000);
for(x in close);
// FIXME: if we made it here, do we want to try harder?
};
return dojo;
});