source: trunk/admin/inc/FCKeditor/editor/_source/classes/fckiecleanup.js@ 2

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 1.2 KB
Line 
1/*
2 * FCKeditor - The text editor for internet
3 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4 *
5 * Licensed under the terms of the GNU Lesser General Public License:
6 * http://www.opensource.org/licenses/lgpl-license.php
7 *
8 * For further information visit:
9 * http://www.fckeditor.net/
10 *
11 * "Support Open Source software. What about a donation today?"
12 *
13 * File Name: fckiecleanup.js
14 * FCKIECleanup Class: a generic class used as a tool to remove IE leaks.
15 *
16 * File Authors:
17 * Frederico Caldeira Knabben (fredck@fckeditor.net)
18 */
19
20
21var FCKIECleanup = function( attachWindow )
22{
23
24 this.Items = new Array() ;
25
26 attachWindow._FCKCleanupObj = this ;
27 attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ;
28}
29
30FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction )
31{
32 this.Items.push( [ dirtyItem, cleanupFunction ] ) ;
33}
34
35function FCKIECleanup_Cleanup()
36{
37 var aItems = this._FCKCleanupObj.Items ;
38 var iLenght = aItems.length ;
39
40 for ( var i = 0 ; i < iLenght ; i++ )
41 {
42 var oItem = aItems[i] ;
43 oItem[1].call( oItem[0] ) ;
44 aItems[i] = null ;
45 }
46
47 this._FCKCleanupObj = null ;
48
49 if ( CollectGarbage )
50 CollectGarbage() ;
51}
Note: See TracBrowser for help on using the repository browser.