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
Created attachment 240476 [details] Minimal test to illustrate the patch
Created attachment 240484 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 240921 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 241094 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 241489 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 241490 [details] Minimal test to illustrate the patch
Created attachment 241569 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 241576 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 241585 [details] Patch that allow to set from javascript the internal object of an object element
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
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-ews (mac): Output: http://webkit-queues.appspot.com/results/4629795321151488 Number of test failures exceeded the failure limit.
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
Created attachment 241595 [details] Patch that allow to set from javascript the internal object of an object element
Created attachment 241711 [details] Patch that allow to set from javascript the internal object of an object element
I don't think I can review this but you'll need to provide changelog entries, see http://www.webkit.org/coding/contributing.html
Created attachment 241713 [details] Patch
Created attachment 241715 [details] HTMLObjectElement: can set the underlying object from javascript
Created attachment 241717 [details] HTMLObjectElement: can set the underlying object from javascript
Comment on attachment 241717 [details] HTMLObjectElement: can set the underlying object from javascript No Julien, only reviewers should set the r+ flag.
Add reviewers that Tools/Scripts/webkit-patch suggest-reviewers printed.
Hi, Julien, Can you explain your usecase of using this interface and any other general usecases you might think of?
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
Julien, is this the same use case that Web Components and Shadow DOM serve?
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.