Ticket #11400: removeAllListeners.html

File removeAllListeners.html, 542 bytes (added by Piotr Jasiun, 8 years ago)
Line 
1<!DOCTYPE html>
2<html>
3<head>
4        <title>CKEditor Inline Editor Sample </title>
5        <meta charset="utf-8">
6        <script src="../../ckeditor.js"></script>
7</head>
8<body>
9        <a href="#" id="a">clickable</a>
10</body>
11<script>
12
13        var clickCouter = 0,
14                a = CKEDITOR.document.getById( 'a' );
15
16        a.on( 'click', function( evt ) {
17                clickCouter++;
18                console.log( 'click (' + clickCouter + ')' );
19        } );
20
21        // click (1) should be shown
22        a.fire( 'click' );
23
24        a.removeAllListeners();
25
26        // click (2) should not be shown, but it is!
27        a.fire( 'click' );
28
29</script>
30</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy