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

91 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Philip Jägenstedt

belum dibaca,
15 Nov 2016 16.29.0515/11/16


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


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:

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 and 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

OWP launch tracking bug

Entry on the feature dashboard

Requesting approval to remove too?

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


belum dibaca,
15 Nov 2016 18.02.1215/11/16
kepadaPhilip Jägenstedt, blink-dev

Software Engineer, Google

Rick Byers

belum dibaca,
17 Nov 2016 10.59.2417/11/16
kepadaTAMURA, Kent, Philip Jägenstedt, blink-dev

Chris Harrelson

belum dibaca,
17 Nov 2016 12.20.4917/11/16
kepadaRick Byers, TAMURA, Kent, Philip Jägenstedt, blink-dev

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

Balas ke semua
Balas ke penulis
0 pesan baru