Shared publicly  - 
More information about the proposal to switch to an object literal syntax which will allow us to iterate on the API more freely.
In late March +Greg Billock announced a proposal to change the constructor of the `Intent` object. The change is important because as more use-cases arrive such as default and explicit intents, we found that adding more and more parameters to the constructor made for a mess of "undefined" values in a constructor invocation for optional parameters.

The proposal changes the original syntax from:
var x = new Intent("", "", person);
var x = new Intent({"action": "",
"type": "",
"data": person});
W3C home > Mailing lists > Public > > March 2012. Proposal to switch to an object-literal Intent constructor. This message : [ Message body ] [ Respond ] [ More o...
James McGill's profile photoDan Brickley's profile photo
This is an incredibly sensible proposal. If there is one thing I have learned as a Javascript API developer, it is that this is the correct way to format API constructors.
Add a comment...