Mikko - in case you are not subscribed to Mozilla's dev-tech-xbl mail list, here is some information about Sean Hogan's XBL2 JavaScript implementation:

  <http://www.meekostuff.net/xbl2/status.html>

Mikko, Sean - what are your thoughts regarding consolidating your implementations:

  <http://dev.w3.org/cvsweb/2006/waf/XBLImpl/>

Regards, Art Barstow

Begin forwarded message:

From: "ext Sean Hogan" <[EMAIL PROTECTED]>
Date: November 25, 2007 8:04:16 PM EST
To: Sean Hogan <[EMAIL PROTECTED]>, Ian Hickson <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: XBL2 questions

You may find the (hopefully valid) status report for my XBL2
implementation at

    http://www.meekostuff.net/xbl2/status.html

cheers,
Sean


Sean Hogan wrote:
I've been implementing XBL2 in javascript.  A few demos are up at:

   http://www.meekostuff.net/xbl2/showcase/index.html

Feedback is welcome.

There's still a lot more to do, and I'm only aiming for a partial
implementation, but it has raised a few questions about the spec:


1. Processing Instructions in HTML (as opposed to XML) aren't detected
in many browsers.
How about <link rel="bindings" type="text/xml" href="binding.xml" / > as
an alternative?


2. Ordinary scripts can override native methods of elements. It should
be possible for XBL bindings to as well.
Perhaps binding documents linked with rel="system bindings"?


3. Shouldn't xblBindingAttached be executed when the sub-tree is ready?
Or maybe there could be a xblSubtreeReady method?


4. It seems illogical to have an xblBindingAttached, but not
xblBindingDetached.


5. Is the global script scope (and the Window object) for a binding
document the same as that of the bound document? (apart from document,
location, history and cookie properties).
I guess the motivating question is: are functions, classes, etc declared
in a bound document available in the binding document context, and
vice-versa?


6. Does ElementXBL.addBinding(url) add the binding if it has already
been added with addBinding?


7. 'Anything else ("modifier")' in Section 6.7 is under specified.


8. The @extends attribute on a binding doesn't match the usual
understanding of extends.
I'm sure you'll getting people expecting to access
this.baseBinding.method() as this.method()
Also, when ES4 comes along you will get bindings written as:
<binding element="*" extends="#bindingA">
   <implementation>
      new class classB extends classA { }
   </implementation>
</binding>

Shouldn't @extends be @base-binding?


9. The relationship between external and internal objects and the
implementation prototype seems wrong.  (Section 5.4)
Shouldn't the [[Prototype]] property of the internal object be set to
the implementation prototype object.
Then any methods or properties on the implementation prototype are added to the external object as though they are bound to the internal object.


Something like:
var prototype = ... ; // from binding document
var implementation = function() {};
implementation.prototype = prototype;
var internal = new implementation;
var external = {};
for (var method in implementation.prototype) {
   external[method] = function() {
implementation.prototype[method].apply(internal, arguments); }
}


10. Shouldn't there be a ElementXBL.getBinding(url)? I can't see that
the current spec facilitates this.


cheers,
Sean







_______________________________________________
dev-tech-xbl mailing list
[EMAIL PROTECTED]
https://lists.mozilla.org/listinfo/dev-tech-xbl


Reply via email to