[whatwg] Declarative web worker creation and communication?

1. Declarative web worker creation.

Feedback and suggestions for appropriate markup to declare web workers
would be appreciated.

The use case is a document with JS disabled or restricted so that it can not
create web workers, yet still wants to create web workers to process page
input and to update the document.

For example, would a meta element be appropriate:
<meta name="webworker" content="worker1.js">


2. Declarative message handlers that update the DOM.

Feedback and suggestions for appropriate markup to declare points in a HTML
document that could be updated from received messages would be appreciated.

The use case is a document with JS disabled or restricted so that it can not
use JS to receive a message and update the DOM, yet still wants to support
AJAX style designs.   For example the document JS may be disabled but a
declarative mechanism may be defined to enable web workers to be create
and these need to be able to post changes to the document.

A mechanism specific to the need may be better for security.  For example,
being able to bind a HTML <div> element to a specific web worker.  A general
mechanism that allows a message to update any element by ID may be
less desirable for security.

Would it be best to use an iframe for all such use, perhaps using a new URL
that specifies a message target?

Would it be appropriate to add a new attribute to HTML elements that allows
their inner HTML to be replaced from a received message?

3. Declarative user input message posts.

Appropriate markup for declaring events to pass to web workers via messages
is also being considered, and feedback on this would also be appreciated.

For example, a form in a parent document with document JS disabled that still
wants to be able to post a submitted form to a web worker for processing, or
posting a message when a button is clicked.

For a form, perhaps a new form 'method' could be defined, say 'postmessage',
or perhaps a new URL scheme in the form 'action' would be adequate? 

For a button a new URL scheme might be adequate for declaring a web worker
as the target.

Perhaps new HTML element attributes would be more appropriate?

Such usage may be rather different to typical HTTP URLs, as there may be no
response, but this may well suit the use and the web worker could use the
above mechanisms to post changes back to the document.  Would it be better
to define a response message?

4. Accessibility

There may be some potential to associate posted messages from UI elements
with key short cuts or other input to support accessibility.

Having declared points in the document that can receive updates may also
help accessibility, and perhaps a description could be added.   For example
a <div> element that receives email message updates could have a description
such as 'Email' and a reader support tool could then report the event to the
user.

A web page with active content that separates presentation from processing
using a non-JS document of presentation and web workers for processing with
a restricted set of messages may also help support accessibility. 

Perhaps accessibility it is already well supported.   Feedback from people with
experience in this area would be welcomed.

Is anyone aware of any related work?

cheers
Fred

 		 	   		  

Received on Saturday, 3 November 2012 01:29:53 UTC