[KSS-checkins] r41974 - kukit/kukit.js/branch/ree-load-event-cleanup/kukit
reebalazs at codespeak.net
reebalazs at codespeak.net
Mon Apr 9 13:22:53 CEST 2007
Author: reebalazs
Date: Mon Apr 9 13:22:52 2007
New Revision: 41974
Modified:
kukit/kukit.js/branch/ree-load-event-cleanup/kukit/dom.js
kukit/kukit.js/branch/ree-load-event-cleanup/kukit/plugin.js
Log:
The iload event parameter's name is changet to 'autodetect' and made to a mandatory parameter for now.
Modified: kukit/kukit.js/branch/ree-load-event-cleanup/kukit/dom.js
==============================================================================
--- kukit/kukit.js/branch/ree-load-event-cleanup/kukit/dom.js (original)
+++ kukit/kukit.js/branch/ree-load-event-cleanup/kukit/dom.js Mon Apr 9 13:22:52 2007
@@ -304,10 +304,10 @@
*
* Scheduler for embedded window content loaded
*/
-kukit.dom.EmbeddedContentLoadedScheduler = function(framename, func, directmark) {
+kukit.dom.EmbeddedContentLoadedScheduler = function(framename, func, autodetect) {
this.framename = framename;
this.func = func;
- this.directmark = directmark;
+ this.autodetect = autodetect;
var self = this;
var f = function() {
self.check();
@@ -346,7 +346,7 @@
this.counter.restart = false;
}
- // directmark=true implements a more reliable autosense method
+ // autodetect=false implements a more reliable detection method
// that involves cooperation from the internal document. In this
// case the internal document sets the _kssReadyForLoadEvent attribute
// on the document, when loaded. It is safe to check for this in any
@@ -356,7 +356,7 @@
this.counter.restart = false;
}
- if (! this.directmark && this.counter.restart) {
+ if (this.autodetect && this.counter.restart) {
// obviously we are not there... this happens on FF
if (doc.location.href == 'about:blank') {
Modified: kukit/kukit.js/branch/ree-load-event-cleanup/kukit/plugin.js
==============================================================================
--- kukit/kukit.js/branch/ree-load-event-cleanup/kukit/plugin.js (original)
+++ kukit/kukit.js/branch/ree-load-event-cleanup/kukit/plugin.js Mon Apr 9 13:22:52 2007
@@ -273,11 +273,11 @@
return;
}
if (iload) {
- oper.completeParms([], {'initial': 'true', 'insert': 'true', 'directmark': 'false'}, 'iload event binding');
- // directmark=true changes the iload autosense method to one that requires the iframe set
- // the _kssReadyForLoadEvent attribute on the document. This parameter is explicitely required since
- // otherwise in this case we never notice if the document has arrived.
- oper.evalBool('directmark', 'iload event binding');
+ oper.completeParms(['autodetect'], {'initial': 'true', 'insert': 'true'}, 'iload event binding');
+ // autodetect=false changes the iload autosense method to one that requires the iframe set
+ // the _kssReadyForLoadEvent attribute on the document. Setting this attribute is explicitely required
+ // if autodetect is off, since otherwise in this case we would never notice if the document has arrived.
+ oper.evalBool('autodetect', 'iload event binding');
} else {
oper.completeParms([], {'initial': 'true', 'insert': 'true'}, 'load event binding');
}
@@ -317,9 +317,9 @@
if (loadoper && ! iloadoper) {
iloadoper = loadoper;
loadoper = null;
- // with the legacy loads we suppose directmark=true
- iloadoper.parms.directmark = true;
- kukit.logWarning('Deprecated the use of "load" event for iframes. It will behave differently in the future. Use the "iload" event (maybe with evt-iload-directmark: true) instead!');
+ // with the legacy loads we suppose autodetect=false
+ iloadoper.parms.autodetect = false;
+ kukit.logWarning('Deprecated the use of "load" event for iframes. It will behave differently in the future. Use the "iload" event (maybe with evt-iload-autodetect: false) instead!');
}
} else {
// Not an iframe. So iload is not usable.
@@ -350,7 +350,7 @@
var func_to_bind = iloadoper.makeExecuteActionsHook();
kukit.engine.bindScheduler.addPost(func_to_bind, 'Execute iload event for iframe ' + iloadoper.node.name);
};
- new kukit.dom.EmbeddedContentLoadedScheduler(iloadoper.node.id, f, iloadoper.parms.directmark);
+ new kukit.dom.EmbeddedContentLoadedScheduler(iloadoper.node.id, f, iloadoper.parms.autodetect);
}
kukit.engine.bindScheduler.addPost(g, 'Schedule iload event for iframe ' + iloadoper.node.name);
} else {
More information about the Kukit-checkins
mailing list