W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: [widgets] Seeking comments on Last Call WD of Widgets: APIs and Events spec; deadline 15 Sept 2009

From: Marcos Caceres <marcosc@opera.com>
Date: Thu, 20 Aug 2009 21:40:49 +0200
Message-ID: <b21a10670908201240u4cae2797y9b9154a740b8392d@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Arthur Barstow <art.barstow@nokia.com>, public-webapps <public-webapps@w3.org>
On Thu, Aug 20, 2009 at 11:16 AM, Marcos Caceres<marcosc@opera.com> wrote:
>> The lack of review should be obvious from the errors in nearly all the
>> examples: in 6.5.1 it uses made-up schemes without pointing that out in
>> any way,

They are not made up? - only feed does not have a spec!  Specs below:

//open email

//make a phone call

//open a web page

//send and sms


I've removed feed, but still hold that is is valid even though it is
not standardized.

>  6.4.2 invokes a .forEach method on a NodeList that a NodeList
>> is not defined to have,

Yep, Robin's code was no good. I rewrote it (and tested it in FF using
window.localStorage to make sure it works):

<!doctype html>
<fieldset id="prefs-form">
  <legend>Game Options</legend>
  <label>Volume:  <input type="range" min="0" max="100"
name="volume"/> </label>
  <label>Difficulty:  <input type="range" min="0" max="100"
name="difficulty"/> </label>
  <input type="button" value="Save" onClick="savePrefs()"/>

var form   = document.getElementById("prefs-form");
var fields = form.querySelectorAll("input[type='range']");

function loadPrefs () {
   for(i in fields){
      var field = fields[i];
      if (typeof widget.preferences[field.name] != "undefined") {
        field.value = widget.preferences[field.name];

function savePrefs () {
  for(var i = 0; i < fields.length; i++){
      var field = fields[i];
      widget.preferences[field.name] = field.value;

>  in 6.4.1 the JSON code is malformed due to usage
>> of the wrong quote marks,

Ok, got me there! :) I didn't know you were not allowed to use single
quotes in JSON.

> and 6.1.1 fails to escape the markup it
>> attempts to insert, leading to undesired effects if special characters
>> are used in the values.

Ok, can you help us out with some good text to use here? How do you
recommend we secure this bit?

Kind regards,

Marcos Caceres
Received on Thursday, 20 August 2009 19:41:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 14:36:37 UTC