- From: <richard.tibbett@orange-ftgroup.com>
- Date: Mon, 21 Dec 2009 18:11:13 +0100
- To: <public-device-apis@w3.org>
Hi, Looking in to the WebIDL documentation I see some value in using PutForwards [1] for Contacts API [2] 'complex' attributes. The intention is to increase the simplicity for developers to work with ContactField-based attributes (e.g. currently these are phones, emails, impps attributes in the Contact interface): The intention is for... contact.phones.push({value:'+440000000001'}); // add a new value, relying on the existing mechanism ...to become equivalent to: contact.phones.push('+440000000001'); // ...add a new value, relying on a PutForwards helper mechanism to set the resulting 'value' attribute to '+440000000001'. My question is a.) whether this is of interest for this API, and b.) how it can be correctly defined in WebIDL based on the nature of the attribute (an Array). Currently I have the following markup in mind: interface ContactField { attribute DOMString[]? types; attribute DOMString value; }; interface ContactProperties { ... [PutForwards=value] readonly attribute ContactField[] phones; ... }; Is this specified correctly??? This could require clarification via the WebIDL mailing list but worthwhile getting feedback from DAP participants on the proposed helper mechanism first... Best Regards, Richard [1] http://dev.w3.org/2006/webapi/WebIDL/#PutForwards [2] http://dev.w3.org/2009/dap/contacts/
Received on Monday, 21 December 2009 17:11:43 UTC