[whatwg] Minor event-source (SSE) modification

Ian Hickson ian at hixie.ch
Tue Apr 22 20:21:37 PDT 2008


On Mon, 21 Apr 2008, Michael Carter wrote:
> 
> Unfortunately, the current Server-sent Events specification provides no 
> way for a user of the event-source API to know the value of the 
> lastEventId, thus making it impossible to send an ACK out-of-band. We 
> have two proposals, either of which can solve this problem.
> 
> 1) Expose the id attribute on each dispatched event. This allows us to 
> send out-of-band ACKs as required. The downside is that we would need to 
> extend the MessageEvent interface.
> 
> 2) Expose an add/remove EventListener on the event-source dom element 
> that dispatches whenever the last event id for an event source is 
> changed. The event generated by a change in the last event id would have 
> that id value as an attribute, as well as the href for the event source 
> associated with the id.

Added MessageEvent.lastEventId to handle this case.

Thanks for the feedback,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list