Cross Reference: /yui3/src/oop/tests/clone.html
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
<!DOCTYPE html>
<html>
<head>
<title>YUI 3.2.0 Cloning Event kills window.undefined</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body lang="en-US" class="yui3-skin-sam">
<h1>Y.clone bug w/ events</h1>
<!--
<script type="text/javascript" src="http://yui.yahooapis.com/combo?3.1.1/build/yui/yui-min.js"></script>
-->
<script type="text/javascript" src="/build/yui/yui-min.js"></script>
<script type="text/javascript">
YUI({
combine: false,
filter: "raw"
}).use("dump", "test", "node", "event", "console", function(Y) {
var ev = Y.on("click", function(e) {
//no-op
}, "#h1");
// var ev = Y.on('fooboo', function(e) { });
var r = new Y.Console({
verbose : true,
newestOnTop : false,
height: '600px',
width: "500px"
}).render();
Y.Test.Runner.add(new Y.Test.Case({
"window.undefined should start out undefined" : function() {
Y.assert(typeof window.undefined === "undefined");
},
"window.undefined should still be undefined after cloning an event" : function() {
Y.clone(ev);
Y.log(window.undefined);
Y.assert(typeof window.undefined === "undefined");
}
})).run();
});
</script>
</body>
</html>