W3C home > Mailing lists > Public > public-appformats@w3.org > May 2006

Re: Comments on XBL 2.0 Revision 1.43

From: Mike Shaver <mike.shaver@gmail.com>
Date: Thu, 18 May 2006 04:05:46 +0200
Message-ID: <cc092ba00605171905o3b05f799wc68cf76328b0b7ca@mail.gmail.com>
To: "Ian Hickson" <ian@hixie.ch>
Cc: "Arthur Barstow" <art.barstow@nokia.com>, dev-tech-xbl@lists.mozilla.org, public-appformats@w3.org

On 5/18/06, Ian Hickson <ian@hixie.ch> wrote:
> | 2.10. The handler Element
> |
> | ISSUE-J Why does the handler element not have a src attribute to
> | facilitate script re-use?
> Because in practice you only want one JS file, not one per handler. To
> do this, you would define the functions in the implementation, and
> then invoke the functions from the handlers.

I meant to ask this during Sicking's talk today at XTech, and then
forgot in the kerfuffle about style scoping:

What about using a fragment identifier, such that
src="wibbleimpl.js#handleWobble" would let me have a |function
handleWobble() { }| in wibbleimpl.js?  It would seem easier to write
than the pattern you describe, would permit more flexible source
layout for binding implementations, and would let us give better
diagnostics, too.

(The latter because the XBL2 impl can tell if it'll be able to match
up a given handler's "real" implementation when the binding is loaded,
rather than having to wait until a possibly-uncommon event is actually

I think this is basically the same reasoning I used with Hyatt to get
the original fragment-to-pick-binding mechanism in XBL1, so I'm hoping
for a repeat!

Received on Thursday, 18 May 2006 05:30:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:50:04 UTC