Sending custom elements over the wire (was Re: [webkit-dev] XML Events in WebKit)
Getting marginally off-topic for webkit-dev, but I don't mind having a bit of general web standards discussion here... On Dec 8, 2007, at 8:05 AM, Antoine Quint wrote: On 8 déc. 07, at 01:14, Ian Hickson wrote: On Fri, 7 Dec 2007, Antoine Quint wrote: XML Events basically come in handy when you want a generic markup- based way to add event listeners for custom events. For instance, if XBL was implemented in WebKit, and I had my own custom magic UI control implemented with some custom XML element, [...] ...then you shouldn't be sending it over the wire, so it shouldn't matter... (You shouldn't send custom, aka proprietary, vocabularies over the wire, since you have no way to guarentee the end user can handle it.) We're drifting away from the original topic a bit, but I'm wondering if such a statement would jeopardize the validity of the existence of XBL, or if you see XBL as a technology for standalone, browser- based application? Personally, I see no big problem using custom grammars when XBL is available on the client. XBL is a better solution than today's de facto approach to custom elements, div class=something plus after-the-fact script hooks. It lets you avoid having semantically neutral div elements in the case where you want to make a custom widget that basically acts like an existing element with known semantics. For example, when making a custom button or checkbox with XBL, it's clearly better to bind to button or input type=checkbox respectively than to div class=button or div class=checkbox. However, sometimes it is useful to package behavior and presentation that doesn't sensibly correspond to the semantics of any existing standard element. One example of this would be a tri-state checkbox. But it's likely there will always be application interaction elements that can't reasonably be expressed as a fancy version of a well-known control. In this case you'll still have the option of div with a special class. And it is also technically feasible to use XML to bind to a custom element in the HTML namespace, or in XML a custom element in a custom namespace. I am not sure there is a material difference among these options. In each case there are no predefined semantics being expressed. But semantics could be added through widespread convention, as with microformats. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] XML Events in WebKit
On Dec 7, 2007, at 7:02 PM, Raj Kiran Talusani wrote: Guys, thanks very much for all the comments. let me be more specific about my problem. i want to add multimodal capabilities to the webkit. I want to trigger (or communicate with) an external app based on events happening in the xhtml document. Also i want to insert custom events into the XHTML context based on results from the external process. Is there any way i can do this with current version of webkit. any pointers on what needs to be done? Are you working with the Mac OS X WebKit API? If so, you can use the Objective-C DOM API to attach native event listeners, and to inject custom events. Alternately, you can use the Objective-C JavaScript bindings to export a custom native object to JavaScript, and call that from event listeners defined in script or using onxxx handlers. You could also use the JavaScript bindings to call JavaScript functions that dispatch custom events. Which way works better will depend on the details of your application. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] XML Events in WebKit
On 8 déc. 07, at 01:14, Ian Hickson wrote: On Fri, 7 Dec 2007, Antoine Quint wrote: XML Events basically come in handy when you want a generic markup- based way to add event listeners for custom events. For instance, if XBL was implemented in WebKit, and I had my own custom magic UI control implemented with some custom XML element, [...] ...then you shouldn't be sending it over the wire, so it shouldn't matter... (You shouldn't send custom, aka proprietary, vocabularies over the wire, since you have no way to guarentee the end user can handle it.) We're drifting away from the original topic a bit, but I'm wondering if such a statement would jeopardize the validity of the existence of XBL, or if you see XBL as a technology for standalone, browser-based application? Personally, I see no big problem using custom grammars when XBL is available on the client. Antoine -- Blog — http://the.fuchsia-design.com ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] XML Events in WebKit
On Dec 7, 2007, at 8:53 AM, Antoine Quint wrote: Hi, On 7 déc. 07, at 17:38, David Hyatt wrote: Yeah, they don't seem particularly compelling to me either. If someone does implement these, they should put the implementation behind an #ifdef so that those projects that aren't interested in them can turn them off. XML Events basically come in handy when you want a generic markup- based way to add event listeners for custom events. For instance, if XBL was implemented in WebKit, and I had my own custom magic UI control implemented with some custom XML element, I'll likely want to fire custom DOM Events, and XML Events would be a neat way for users of my widget to listen to some of these custom events without resorting to a purely script-based approach using addEventListener(). XML Events doesn't seem terribly compelling to me, because event handling about running script, so avoiding use of script to define event handlers isn't hugely compelling. And on the other hand, it's much more verbose for very simple cases than onkeypress/onclick/ etc style event listener attributes. Furthermore, the current trend among web developers is to attach all event handlers separately in script (unobstrusive JavaScript), so XML Events seems to be going in the wrong direction by putting more event listeners back in the markup. It's a lot of ifs, but if WebKit ever supports XBL and custom DOM Events, then it'd be worth re-thinking the usefulness of XML Events in WebKit. I think XBL bindings could support onwhatever style attributes if they want to make simple cases easy for their custom events. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] XML Events in WebKit
Hi, On 7 déc. 07, at 17:38, David Hyatt wrote: Yeah, they don't seem particularly compelling to me either. If someone does implement these, they should put the implementation behind an #ifdef so that those projects that aren't interested in them can turn them off. XML Events basically come in handy when you want a generic markup- based way to add event listeners for custom events. For instance, if XBL was implemented in WebKit, and I had my own custom magic UI control implemented with some custom XML element, I'll likely want to fire custom DOM Events, and XML Events would be a neat way for users of my widget to listen to some of these custom events without resorting to a purely script-based approach using addEventListener(). It's a lot of ifs, but if WebKit ever supports XBL and custom DOM Events, then it'd be worth re-thinking the usefulness of XML Events in WebKit. Antoine -- Blog — http://the.fuchsia-design.com ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] XML Events in WebKit
Guys, thanks very much for all the comments. let me be more specific about my problem. i want to add multimodal capabilities to the webkit. I want to trigger (or communicate with) an external app based on events happening in the xhtml document. Also i want to insert custom events into the XHTML context based on results from the external process. Is there any way i can do this with current version of webkit. any pointers on what needs to be done? Raj On Dec 8, 2007 5:44 AM, Ian Hickson [EMAIL PROTECTED] wrote: On Fri, 7 Dec 2007, Antoine Quint wrote: XML Events basically come in handy when you want a generic markup-based way to add event listeners for custom events. For instance, if XBL was implemented in WebKit, and I had my own custom magic UI control implemented with some custom XML element, [...] ...then you shouldn't be sending it over the wire, so it shouldn't matter... (You shouldn't send custom, aka proprietary, vocabularies over the wire, since you have no way to guarentee the end user can handle it.) -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] XML Events in WebKit
Hello all, Does webkit support the XML Events specification http://www.w3.org/2001/xml-events. To be specific, some thing like the following is valid for WebKit? ev:listener event=focus observer=mytextbox handler=myhandler/ thanks in advance Raj ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev