Firefox3.1/Server-Sent DOM Events
Jump to navigation
Jump to search
Overview
Add support for WhatWG's Server-Sent DOM Events HTML5.
- Background links
- bug 338583 - Add support for Server-Sent DOM Events (Remote Events)
- http://www.whatwg.org/specs/web-apps/current-work/#server-sent-events - HTML5 spec for Server-sent events.
- http://br.youtube.com/watch?v=iGdPJYtMgSM - YouTube demonstration.
Security and Privacy
- What security issues do you address in your project?
- Accessing cross domains, and events security issues.
Exported APIs
- Please provide a table of exported interfaces (APIs, ABIs, protocols, UI, etc.)
- nsIRemoteEventSourceManager interface
- text/event-stream protocol
- nsIDOMRemoteEventTarget interface
- nsIDOMHTMLEventSourceElement interface (add the eventsource tag)
- Explain the significant file formats, names, syntax, and semantics.
- Main C++ code:
- content/events/public/nsIRemoteEventSourceManager.h
- content/events/src/nsRemoteEventSourceManager.cpp
- content/events/src/nsRemoteEventSourceManager.h
- content/html/content/src/nsHTMLEventSourceElement.cpp
- dom/public/idl/events/nsIDOMRemoteEventTarget.idl
- dom/public/idl/html/nsIDOMHTMLEventSourceElement.idl
- Main test file: content/events/test/test_bug338583.html
- Terminology:
- Message Event or Remote Event: An actual event object that is created by the browser in response to a remote server's command
- Remote Event Target: A DOM object that can have Remote Event Sources
- Remote Event Source: The object which is responsible for maintaining a connection to the server and parsing events.
- DOM Event Stream: The stream of characters a server sends to the browser to create events. Its MIME type is text/event-stream
- Main C++ code:
- Are the externally visible interfaces documented clearly enough for a non-Mozilla developer to use them successfully?
- Yes, dom/public/idl/events/nsIDOMRemoteEventTarget.idl and dom/public/idl/html/nsIDOMHTMLEventSourceElement.idl
- Does it change any existing interfaces?
- Yes, nsPIDOMEventTarget.
Module interactions
- What other modules are used (REQUIRES in the makefile, interfaces)
- mimetype, htmlparser, content, dom.
Data
- What data is read or parsed by this feature
- text/event-stream
- What is the output of this feature
- Server-sent events (Message Events)
Reliability
- What failure modes or decision points are presented to the user?
- Failures are transparently handled and when necessary there is some information in the errors console.
- Can its files be corrupted by failures? Does it clean up any locks/files after crashes?
- No files to corrupt.
Configuration
- Can the end user configure settings, via a UI or about:config? Hidden prefs? Environment variables?
- No.
- Are there build options for developers? [#ifdefs, ac_add_options, etc.]
- No.
- What are its on-going maintenance requirements (e.g. Web links, perishable data files)?
- None.
Relationships to other projects
Are there related projects in the community? No.