Best way to bind custom Javascript objects to HTML <object> tags dependent on "type" property.

100 views
Skip to first unread message

Ludwig Wagner

unread,
Aug 21, 2016, 1:31:58 AM8/21/16
to Chromium-discuss
Hi folks,

I want to make a custom build of chromium to link HTML <object> tags with different MIME-types (type property of the tag) to different Javascript classes, like it was possible with NPPlugins earlier. 

I use Websites that are provided to me (So I cant change the JS code!) and work together with a self-written NPAPI Plugin. The Javascript objects are created with <object> tags with different MIME-types (defined by the type property). The Plugin provides several propertys and methods (different ones for each mime-type) that are accessed by Javascript code. As PPAPI does not support direct acces to propertys and methods in Javascript and NPAPI support was removed in recent versions of Chromium, I want to build a recent chromium that has the functionality build-in.

So, what is the best way to do this? I think I have to create a class with my previous implementation for each of my plugin types (in third_party/WebKit/Source/core/xyz) and create a .idl file for each to auto-generate the bindings to V8. The thing that I am not sure about, is the best way to link that classes to the <object> HTML tag depending on the "type" property of the tag.

By default, the HTMLObjectFactory of blink determines on the tag name, which HTML object to create, and creates a HTMLObjectElement for the <object> tag. Whats the best way to extend the HTMLObjectElement to offer methods and propertys that depend on the mime-type? How can methods and propertys, that are not defined within the HTMLObjectElement.idl file, be registered at runtime (as soon as the plugin type was determined)? I did not work with the chromium source code yet and need some help.

Thank you in advance!

PhistucK

unread,
Aug 21, 2016, 2:54:46 AM8/21/16
to ludwigwag...@gmail.com, Chromium-discuss


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Reply all
Reply to author
Forward
0 new messages