Ticket #7700: leak.html

File leak.html, 1.3 KB (added by Alfonso Martínez de Lizarrondo, 13 years ago)

Simpler testcase

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head id="Head1">
4        <title></title>
5        <script src="/ckeditor/ckeditor_source.js" type="text/javascript"></script>
6</head>
7<body>
8        <form id="form1" onsubmit="Update(); return false;">
9        <input type="checkbox" id="loop" onclick="clearTimeout(timer)" checked><label for="loop">Loop creation/destroy</label>
10
11        <div id="updatePanel">
12        </div>
13
14        <script type="text/javascript">
15
16                var timer;
17
18                function CreateEditor() {
19                        CKEDITOR.replace('txt1');
20                }
21
22                CKEDITOR.on("instanceReady", function () { if (document.getElementById("loop").checked) { clearTimeout(timer); timer = setTimeout(sendClick, 1000);} })
23
24                function destroyEditor() {
25                        for (var i in CKEDITOR.instances) {
26                                CKEDITOR.instances[i].destroy();
27                        }
28                        return true;
29                }
30
31                function sendClick() {
32                        document.getElementById('button1').click()
33                }
34
35                function Update()
36                {
37                        var panel = document.getElementById("updatePanel");
38                        panel.innerHTML = '<textarea id="txt1" cols="20" name="txt1" rows="2"></textarea>' +
39                                '<input id="button1" type="submit" onclick="destroyEditor();" />';
40                        CreateEditor();
41                }
42
43                Update();
44        </script>
45        </form>
46</body>
47</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy