W3C home > Mailing lists > Public > public-appformats@w3.org > November 2007

XBL2 JavaScript Implementation by Sean Hogan

From: Arthur Barstow <art.barstow@nokia.com>
Date: Tue, 27 Nov 2007 01:04:38 -0500
Message-Id: <0A3A7F0C-27F5-47D2-9DE4-BC0CFC6E6C12@nokia.com>
Cc: public-appformats@w3.org
To: Mikko Pohja <mikko.pohja@hut.fi>, Sean Hogan <shogun70@westnet.com.au>

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" <shogun70@westnet.com.au>
> Date: November 25, 2007 8:04:16 PM EST
> To: Sean Hogan <shogun70@westnet.com.au>, Ian Hickson  
> <ian@hixie.ch>, dev-tech-xbl@lists.mozilla.org
> 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
> dev-tech-xbl@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xbl
Received on Tuesday, 27 November 2007 06:05:51 UTC

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