/* * Copyright © 2009 W3C® (MIT, ERCIM, Keio), All Rights Reserved. * W3C liability, trademark and document use rules apply. * * W3C Server-Sent Events * W3C Working Draft 21 April 2009 * http://dev.w3.org/html5/eventsource/ */ #ifndef _EVENTSOURCE_IDL_ #define _EVENTSOURCE_IDL_ #include "w3c/html5.idl" module eventsource { typedef html5::Function Function; [Constructor(in DOMString url)] interface EventSource { readonly attribute DOMString URL; // ready state const unsigned short CONNECTING = 0; const unsigned short OPEN = 1; const unsigned short CLOSED = 2; readonly attribute long readyState; // networking attribute Function onopen; attribute Function onmessage; attribute Function onerror; void disconnect(); }; }; // module eventsource #endif // _EVENTSOURCE_IDL_