Warning:
This wiki has been archived and is now read-only.

Widgets/FAQ-widgets

From WEBAPPS
Jump to: navigation, search


NOTE: This document is no longer maintained because the Web Applications Working Group was closed in October 2015 and its deliverables transferred to the Web Platform Working Group.


This document is a FAQ for the Widget Packaging and Configuration specification.

The information in this FAQ is purely informative (non-normative) - the specification itself is the authoritative document.

This is a Living Document and as such may change at any time. Feedback on the content is always welcome and should be sent to public-webapps@w3.org.


How is the widget's start file determined?

A guiding principle in the design of the start file algorithm is to make simple uses case very easy for authors yet also provide flexibility for more sophisticated use cases such as localized start files. As such, the start file that is used is derived from a set of priorities. Here are those priorities starting with the highest priority. Note that the highest priority start file that is found will be used (and lower priority start files will be ignored):

1. /locales/$LANG-list/custom-start-file (i.e. a custom start file was defined via a content element and its src attribute and the start file is in one of the locales sub-directories in the end-user's language ranges)

2. custom-start-file] (i.e. a custom start file was defined via a content element and its src attribute; e.g. <content src="/resources/start.svg"/>)

3. /locales/$LANG-list/{index.htm,index.html,index.svg,index.xhtml,index.xht} (i.e. use a localized version of one of the default start files)

4. /{index.htm,index.html,index.svg,index.xhtml,index.xht} (i.e. use one of the default start files in the root of the package)

5. Fail (the above priorities resulted in no valid start file being found)

Note: $LANG-list is a set of locales based on end-user's language ranges (e.g. "en", "en es", "en ch-zn")

Is there a Best Practice or Recommendation for the URI scheme used for widget ids?

The widget element's id attribute is optional and when it is used, the id must be a URI (e.g. http://example.org/foo). The specification is silent regarding which URI scheme(s) should be used.

The WebApps community was asked to recommend a URI scheme for a widget id and the answers were: