https://bugzilla.wikimedia.org/show_bug.cgi?id=23580

--- Comment #3 from Amalthea <[email protected]> 2010-05-18 
22:23:58 UTC ---
(In reply to comment #1)
> Perhaps it is better to create something like an addOnLivePreviewHook()

Absolutely right. Would taking this one step further and build a more generic
hook system in wikibits make sense:

function addNamedHook( eventName, hookFunct );
function runNamedHook( eventName, autoexecuteFutureHooks = false );

Second argument of runNamedEventHook would determine if any future added hooks
for that event are executed immediately (e.g. for onload) or delayed till the
next run (e.g. for livepreview). Could possibly pass additional arguments
through to the hook functions.
Otherwise I see multiple such hook systems being built into MediaWiki itself in
the future, it's easy to predict that it will get more and more javascript
functionality down the road. Additional hooks could already be useful in e.g.
mwsuggest and ajaxwatch, and I could see use for such generic hooks to
facilitate inter-script communication of specialized project scripts as well.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to