- From: Anne van Kesteren <annevk@opera.com>
- Date: Tue, 19 Oct 2010 09:54:12 +0200
On Mon, 18 Oct 2010 19:38:46 +0200, Nicholas Zakas <nzakas at yahoo-inc.com> wrote: > Just for my own understanding, what you're saying is: > > 1) Any event name in the stream must be a valid event name in that it > must not have spaces, special characters, etc. (The wording in the spec > made me think that it must be an event name that is listed in the DOM > Events spec, such as click.) Yes, although it is not clear whether per the current DOM Events specification an event name with a space would be invalid. > 2) When you define an custom event name, this still fires the message > event with event.type set to the custom event name. Well, it dispatches an event that uses the MessageEvent interface. But e.g. a function attached to onmessage will not be invoked, as the event is not named message, but something else. So you need obj.addEventListener(customEvent, ...). -- Anne van Kesteren http://annevankesteren.nl/
Received on Tuesday, 19 October 2010 00:54:12 UTC