This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21899 - Allow passing a string as the first argument to `getMediaProperty`
Summary: Allow passing a string as the first argument to `getMediaProperty`
Status: NEW
Alias: None
Product: Media Annotations WG
Classification: Unclassified
Component: api (show other bugs)
Version: LC
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Felix Sasaki
QA Contact: Felix Sasaki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 07:45 UTC by Mathias Bynens
Modified: 2013-05-02 07:46 UTC (History)
1 user (show)

See Also:


Attachments

Description Mathias Bynens 2013-05-02 07:45:49 UTC
Currently, `getMediaProperty` takes an array as its first argument. My suggestion is to make it accept strings too, in case only a single property is to be retrieved.

The spec lists examples like:

    resource.getMediaProperty(["title"], successCallback, errorCallback);

With this change, this could become:

    resource.getMediaProperty("title", successCallback, errorCallback);

IMHO, this makes the API more user-friendly for the common case where only a single property is retrieved.

The array syntax could still be used, but is only really needed when more than one property is requested.