Intent to Deprecate and Remove: MessageEvent.webkitInitMessageEvent()

54 views
Skip to first unread message

Philip Jägenstedt

unread,
May 27, 2014, 5:14:14 PM5/27/14
to blink-dev

Primary eng (and PM) emails

phi...@opera.com


Summary

Remove this from MessageEvent.idl:


webkitInitMessageEvent([Default=Undefined] optional DOMString typeArg,
[Default=Undefined] optional boolean canBubbleArg,
[Default=Undefined] optional boolean cancelableArg,
[Default=Undefined] optional any dataArg,
[Default=Undefined] optional DOMString originArg,
[Default=Undefined] optional DOMString lastEventIdArg,
[Default=Undefined] optional Window sourceArg,
[Default=Undefined] optional MessagePort[] transferables);

Motivation

It is virtually unused, and has an unprefixed replacement.


Compatibility Risk

If used without fallback, would throw an exception.


Alternative implementation suggestion for web developers

Use MessageEvent.initMessageEvent().


Usage information from UseCounter

http://www.chromestatus.com/metrics/feature/timeline/popularity/223


That's consistently at 0%. For comparison, the unprefixed variant is around 0.05%:

http://www.chromestatus.com/metrics/feature/timeline/popularity/222


(I've looked at the generated V8MessageEvent.cpp and verified that UseCounter::PrefixedInitMessageEvent is in fact there, since usage this low is unusual.)

Entry on chromestatus.com and/or MDN

https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent


Requesting approval to remove too?

Yes.

Eric Seidel

unread,
May 27, 2014, 6:25:05 PM5/27/14
to Philip Jägenstedt, blink-dev
LGTM.

Dimitri Glazkov

unread,
May 27, 2014, 6:25:19 PM5/27/14
to Eric Seidel, Philip Jägenstedt, blink-dev
LGTM.

TAMURA, Kent

unread,
May 27, 2014, 7:28:57 PM5/27/14
to Dimitri Glazkov, Eric Seidel, Philip Jägenstedt, blink-dev
LGTM3.

--
TAMURA Kent
Software Engineer, Google


Anne van Kesteren

unread,
May 28, 2014, 3:35:08 AM5/28/14
to Philip Jägenstedt, blink-dev
On Tue, May 27, 2014 at 11:14 PM, Philip Jägenstedt <phi...@opera.com> wrote:
> Alternative implementation suggestion for web developers
>
> Use MessageEvent.initMessageEvent().

That is not standardized either. You want to advocate new
MessageEvent(type, init) instead.


--
http://annevankesteren.nl/

Sigbjorn Finne

unread,
May 28, 2014, 4:05:29 AM5/28/14
to Anne van Kesteren, Philip Jägenstedt, blink-dev
Den 28.05.2014 09:35, skreiv Anne van Kesteren:
> On Tue, May 27, 2014 at 11:14 PM, Philip Jägenstedt <phi...@opera.com> wrote:
>> Alternative implementation suggestion for web developers
>>
>> Use MessageEvent.initMessageEvent().
>
> That is not standardized either. You want to advocate new
> MessageEvent(type, init) instead.
>
>

Definitely; there's https://crbug.com/311332 for that (and this prefixed
appendage.)

--sigbjorn

Philip Jägenstedt

unread,
May 28, 2014, 5:01:49 AM5/28/14
to Anne van Kesteren, blink-dev
On Wed, May 28, 2014 at 9:35 AM, Anne van Kesteren <ann...@annevk.nl> wrote:
>
> On Tue, May 27, 2014 at 11:14 PM, Philip Jägenstedt <phi...@opera.com> wrote:
> > Alternative implementation suggestion for web developers
> >
> > Use MessageEvent.initMessageEvent().
>
> That is not standardized either. You want to advocate new
> MessageEvent(type, init) instead.

Oh, thanks! Unfortunately the usage of MessageEvent.initMessageEvent()
is a bit high still, when was it dropped from Gecko?

Philip

Anne van Kesteren

unread,
May 28, 2014, 5:12:18 AM5/28/14
to Philip Jägenstedt, blink-dev

Simon Pieters

unread,
May 28, 2014, 7:17:09 AM5/28/14
to Philip Jägenstedt, Anne van Kesteren, blink-dev
On Wed, 28 May 2014 09:35:05 +0200, Anne van Kesteren <ann...@annevk.nl>
wrote:

> On Tue, May 27, 2014 at 11:14 PM, Philip Jägenstedt <phi...@opera.com>
> wrote:
>> Alternative implementation suggestion for web developers
>>
>> Use MessageEvent.initMessageEvent().
>
> That is not standardized either. You want to advocate new
> MessageEvent(type, init) instead.

Not having it means createEvent('messageevent') doesn't make sense to
have, either, which was recently added to the DOM spec. Also see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25907

--
Simon Pieters
Opera Software
Reply all
Reply to author
Forward
0 new messages