Intent to Deprecate and Remove: legacy caller for HTMLEmbedElement and HTMLObjectElement

瀏覽次數:91 次
跳到第一則未讀訊息

Philip Jägenstedt

未讀,
2016年11月15日 下午4:29:052016/11/15
收件者:blink-dev

Summary

Drop [Custom=LegacyCallAsFunction] for HTMLEmbedElement and HTMLObjectElement, so that document.createElement("embed")() throws with "x is not a function".


Motivation

The base motivation is getting rid of more custom bindings and reducing unimportant differences between our IDL and the spec.


A legacy caller in WebIDL allows an instance to be invoked as a function. HTML used to have this for embed and object, but no more:

https://github.com/whatwg/html/pull/1979 https://github.com/w3c/web-platform-tests/pull/4084


Per the tests for embed and object, the legacy caller is supported by Chrome and Firefox, but not Edge or Safari. It is being removed from Gecko.


It's not entirely clear to me when this code did anything useful, probably it was for NPAPI. Testing with http://www.sjgames.com/ourgames/flash.html and http://wwwns.akamai.com/hdnetwork/demo/flash/default.html it looks like if a (Flash) plugin is actually initialized, calling as a function throws TypeError. Starting at V8HTMLPlugInElementCustom.cpp I haven't been able to figure out if the call is ever intercepted to do anything.

Compatibility Risk

Any content that invokes embeds or objects as functions will throw exceptions. There's not much hope of identifying this in httparchive, so use counters are all we have to estimate risk, and they are rounding to zero.


Alternative implementation suggestion for web developers

Just remove these calls. If there is in fact some plugin out there where the legacy caller does something useful, please comment on the issue.


Usage information from UseCounter

https://www.chromestatus.com/metrics/feature/timeline/popularity/152 https://www.chromestatus.com/metrics/feature/timeline/popularity/153


OWP launch tracking bug

https://crbug.com/663662


Entry on the feature dashboard


Requesting approval to remove too?

Yes, but I'll add a deprecation message for one release cycle before removing.


TAMURA, Kent

未讀,
2016年11月15日 下午6:02:122016/11/15
收件者:Philip Jägenstedt、blink-dev
LGTM1

--
TAMURA Kent
Software Engineer, Google


Rick Byers

未讀,
2016年11月17日 上午10:59:242016/11/17
收件者:TAMURA, Kent、Philip Jägenstedt、blink-dev
LGTM2

Chris Harrelson

未讀,
2016年11月17日 中午12:20:492016/11/17
收件者:Rick Byers、TAMURA, Kent、Philip Jägenstedt、blink-dev
LGTM3

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

回覆所有人
回覆作者
轉寄
0 則新訊息