[webkit-help] How to add object type and id....

Julien Chaffraix julien.chaffraix at gmail.com
Wed Jun 22 22:20:47 PDT 2011


Hi,

> Please anyone help me, how to implement below example code in our WebKit and
> also give the sample code for my reference.

You are basically asking people to do your work. Seems a bit too easy.
I will answer the basic details of what you need to do, you will have
to fill in the blank. If you have no one with serious WebKit
knowledge, it is time to think about that as CE-HTML is not a small
spec to implement.

[Snipped most of the CE-HTML code]

> <object type="application/oipfapplicationManager" id="appManager"><object/>

This is an HTMLObjectElement (see Source/WebCore/html). There is
several ways to add more to this object. One would be to catch the
'type' attribute inside this object and act on it
(parseMappedAttribute is the way to go).

> var self  = appMgr.getOwnerApplication(window.document) ;

You need to add a new attribute to your appMgr object. This is called
a (JavaScript) binding in WebKit and an most of them are
auto-generated using an IDL files (see HTMLObjectElement.idl). Here I
am pretty sure this will not work as you don't want to expose the new
behavior for every <object>s but only for objects of a certain 'type'.
However you can look at the auto-generated bindings and do something
similar but conditional on the 'type'.

Hope it helps,
Julien


More information about the webkit-help mailing list