Created attachment 240475[details]
Patch that allow to set from javascript the internal object of an object element
Hi,
We know this is probably only useful for our usecase but we wanted to have your point of view if this enhancement may have more general interest.
So the attach patch allow to define a plugin in pure javascript. Then the page can still use a common interface (so not using a custom element).
We know we introduced a new object function which is not specified anywhere but we found this enhancement interesting and we wanted to share it with you.
See minimal attached example.
Cheers,
Julien
Comment on attachment 241585[details]
Patch that allow to set from javascript the internal object of an object element
Attachment 241585[details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6035540264615936
New failing tests:
sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/S15.3.4_A2_T3.html
sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/S15.3.4_A2_T1.html
sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A3.html
plugins/script-object-invoke.html
sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.3/15.3.3.1_Function.prototype/S15.3.3.1_A1.html
sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/S15.3.4_A2_T2.html
plugins/npruntime/throw-exception.html
Created attachment 241588[details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Created attachment 241589[details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Comment on attachment 241717[details]
HTMLObjectElement: can set the underlying object from javascript
No Julien, only reviewers should set the r+ flag.
Our concrete usecase is to wrap custom js objects. These objects can be registered for example from the injectedBundle.
Some of these object are registered through JSClassDefinition. (So it will look like to the second layout test attached to the patch)
One of the consequences is that we do not depend on netscape and pepper plugin APIs.
In HTMLPluginElement there is already a "::getInstance()" method. This patch basically implements "::setInstance" and being a call triggered from javascript.
Created attachment 246095[details]
HTMLObjectElement: can set the underlying object from javascript
Also handle DFG and FTL cases through JITOperations.cpp
Comment on attachment 246095[details]
HTMLObjectElement: can set the underlying object from javascript
Looking at the patch, this is not a direction we'd like to take for plug-ins.
(In reply to comment #25)
> Julien, is this the same use case that Web Components and Shadow DOM serve?
Hi, nop. Unfortunately there is no way in current upstream or in any spec to override existing properties of a tag object. Custom element would have been a good candidate but because if the "is" attribute, this is not workable.
2014-10-27 04:19 PDT, Julien Isorce
2014-10-27 04:22 PDT, Julien Isorce
2014-10-27 09:54 PDT, Julien Isorce
2014-11-04 05:20 PST, Julien Isorce
2014-11-06 01:01 PST, Julien Isorce
2014-11-13 10:10 PST, Julien Isorce
2014-11-13 10:11 PST, Julien Isorce
2014-11-14 02:26 PST, Julien Isorce
2014-11-14 04:08 PST, Julien Isorce
2014-11-14 06:42 PST, Julien Isorce
2014-11-14 07:57 PST, Build Bot
2014-11-14 08:20 PST, Build Bot
2014-11-14 10:01 PST, Julien Isorce
2014-11-17 07:37 PST, Julien Isorce
2014-11-17 08:01 PST, Julien Isorce
2014-11-17 08:11 PST, Julien Isorce
2014-11-17 08:19 PST, Julien Isorce
2015-02-05 03:20 PST, Julien Isorce