<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SamB</id>
	<title>WHATWG Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SamB"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/wiki/Special:Contributions/SamB"/>
	<updated>2026-04-22T14:25:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=GIF&amp;diff=9610</id>
		<title>GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=GIF&amp;diff=9610"/>
		<updated>2014-05-30T02:33:49Z</updated>

		<summary type="html">&lt;p&gt;SamB: More fractint info.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Animated GIFs need a spec that, in particular, specifies how to handle timings (not all browsers honor all values, so we should specify what needs to be honored exactly)&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
=== Gecko ===&lt;br /&gt;
&lt;br /&gt;
* http://mxr.mozilla.org/mozilla-central/source/image/decoders/nsGIFDecoder2.h&lt;br /&gt;
* http://mxr.mozilla.org/mozilla-central/source/image/decoders/GIF2.h&lt;br /&gt;
* http://mxr.mozilla.org/mozilla-central/source/image/decoders/nsGIFDecoder2.cpp&lt;br /&gt;
&lt;br /&gt;
=== WebKit ===&lt;br /&gt;
&lt;br /&gt;
* http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h&lt;br /&gt;
* http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/gif/GIFImageReader.h&lt;br /&gt;
* http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp&lt;br /&gt;
* http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp&lt;br /&gt;
* http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/ImageDecoder.cpp&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
* https://chromium.googlesource.com/chromium/blink/+/master/Source/core/platform/image-decoders/gif/GIFImageDecoder.h&lt;br /&gt;
* https://chromium.googlesource.com/chromium/blink/+/master/Source/core/platform/image-decoders/gif/GIFImageReader.h&lt;br /&gt;
* https://chromium.googlesource.com/chromium/blink/+/master/Source/core/platform/image-decoders/gif/GIFImageDecoder.cpp&lt;br /&gt;
* https://chromium.googlesource.com/chromium/blink/+/master/Source/core/platform/image-decoders/gif/GIFImageReader.cpp&lt;br /&gt;
* https://chromium.googlesource.com/chromium/blink/+/master/Source/core/platform/image-decoders/ImageDecoder.cpp&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
* http://sourceforge.net/p/giflib/code/ci/master/tree/ (giflib)&lt;br /&gt;
* https://github.com/jnordberg/gif.js (gif.js)&lt;br /&gt;
* https://github.com/deanm/omggif (omggif)&lt;br /&gt;
* https://github.com/avik-das/giferly (giferly)&lt;br /&gt;
* http://code.google.com/p/gifdotnet/source/browse/ (gifdotnet)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
&lt;br /&gt;
* GIF87a: [http://web.archive.org/web/20100929230301/http://www.etsimo.uniovi.es/gifanim/gif87a.txt Text] (Stanford) / [http://www.w3.org/Graphics/GIF/spec-gif87.txt Text] (W3C)&lt;br /&gt;
* GIF89a: [http://www.w3.org/Graphics/GIF/spec-gif89a.txt Text] / [http://odur.let.rug.nl/~kleiweg/gif/GIF89a.html HTML]&lt;br /&gt;
* GIF Application Extensions:&lt;br /&gt;
** &amp;lt;code&amp;gt;NETSCAPE&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt;&lt;br /&gt;
*** [http://odur.let.rug.nl/~kleiweg/gif/netscape.html GIF Application Extension: NETSCAPE2.0]&lt;br /&gt;
*** [http://www.vurdalakov.net/misc/gif/netscape-looping-application-extension Netscape Looping Application Extension]&lt;br /&gt;
*** [http://www.vurdalakov.net/misc/gif/netscape-buffering-application-extension Netscape Buffering Application Extension]&lt;br /&gt;
** &amp;lt;code&amp;gt;ANIMEXTS&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;&lt;br /&gt;
*** [http://www.vurdalakov.net/misc/gif/animexts-looping-application-extension AnimExts Looping Application Extension]&lt;br /&gt;
** &amp;lt;code&amp;gt;ICCRGBG1&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;012&amp;lt;/code&amp;gt;&lt;br /&gt;
*** [http://www.color.org/icc1V42.pdf Specification ICC.1:2004-10 (Profile version 4.2.0.0) – Image technology colour management: Architecture, profile format, and data structure] (section B.6)&lt;br /&gt;
** &amp;lt;code&amp;gt;XMP Data&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;XMP&amp;lt;/code&amp;gt;&lt;br /&gt;
*** [http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMPSpecificationPart3.pdf XMP Specification, Part 3: Storage in Files] (section 2.1.2)&lt;br /&gt;
** &amp;lt;code&amp;gt;fractint&amp;lt;/code&amp;gt;&lt;br /&gt;
*** [http://fractint.net/fractsvn/trunk/fractint/common/encoder.c fractint encoder source code]&lt;br /&gt;
*** [http://fractint.net/fractsvn/trunk/fractint/common/loadfile.c fractint decoder source code], with notes and backwards compatibility for older versions of the fractint extension blocks. All of their extension blocks have names of the form &amp;lt;code&amp;gt;fractint&amp;lt;var&amp;gt;nnn&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;nnn&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; is a 3 digit block number.&lt;br /&gt;
&lt;br /&gt;
=== Further details ===&lt;br /&gt;
&lt;br /&gt;
* [[Wikipedia:Graphics Interchange Format]]&lt;br /&gt;
* [http://fileformats.archiveteam.org/wiki/GIF GIF File Format]&lt;br /&gt;
* [http://www.matthewflickinger.com/lab/whatsinagif/ What&#039;s in a GIF]&lt;br /&gt;
* [http://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art011 Command Line Fanatic: Inside the GIF file format]&lt;br /&gt;
* [http://www.theimage.com/animation/toc/toc.html Gifology: Understanding GIF Files &amp;amp; GIF Animation]&lt;br /&gt;
* [http://web.archive.org/web/20100929231133/http://www.etsimo.uniovi.es/gifanim/gifabout.htm All About GIF89a]&lt;br /&gt;
&lt;br /&gt;
=== Test images ===&lt;br /&gt;
&lt;br /&gt;
* ImageTestSuite&lt;br /&gt;
** [http://code.google.com/p/imagetestsuite/wiki/GIFTestSuite Documentation]&lt;br /&gt;
** [http://imagetestsuite.googlecode.com/files/imagetestsuite-gif-1.00.tar.gz Images (Archive)]&lt;br /&gt;
** [http://code.google.com/p/imagetestsuite/source/browse/trunk/gif/ Images (SVN)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Spec coordination]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=How_to_write_a_spec&amp;diff=9509</id>
		<title>How to write a spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=How_to_write_a_spec&amp;diff=9509"/>
		<updated>2014-04-24T03:39:03Z</updated>

		<summary type="html">&lt;p&gt;SamB: zap double redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Specs/howto]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond&amp;diff=9486</id>
		<title>User:Matthew Raymond</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond&amp;diff=9486"/>
		<updated>2014-03-07T17:44:04Z</updated>

		<summary type="html">&lt;p&gt;SamB: Link to actual subpages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On my user page I have some links to proposals I&#039;ve made for various WHATWG specifications.&lt;br /&gt;
&lt;br /&gt;
== Proposals for Web Forms 2.0 and Web Forms 3.0 ==&lt;br /&gt;
&lt;br /&gt;
=== Current Proposals ===&lt;br /&gt;
&lt;br /&gt;
* [[/altinput_element|&amp;amp;lt;altinput&amp;amp;gt;]] element&lt;br /&gt;
* [[/dataentry_element|&amp;amp;lt;dataentry&amp;amp;gt;]] element&lt;br /&gt;
* [[/date_element|&amp;amp;lt;date&amp;amp;gt;]] element&lt;br /&gt;
* [[/time_element|&amp;amp;lt;time&amp;amp;gt;]] element&lt;br /&gt;
* [[/datetime_element|&amp;amp;lt;datetime&amp;amp;gt;]] element&lt;br /&gt;
* [[/month_element|&amp;amp;lt;month&amp;amp;gt;]] element&lt;br /&gt;
* [[/week_element|&amp;amp;lt;week&amp;amp;gt;]] element&lt;br /&gt;
&lt;br /&gt;
=== Outdated / Abandoned Proposals ===&lt;br /&gt;
&lt;br /&gt;
* [[/format_element|&amp;amp;lt;format&amp;amp;gt;]] element&lt;br /&gt;
* [[/idate_element|&amp;amp;lt;idate&amp;amp;gt;]] element&lt;br /&gt;
* [[/icomplex_element|&amp;amp;lt;icomplex&amp;amp;gt;]] element&lt;br /&gt;
&lt;br /&gt;
== Proposals for Web Applications 1.0 ==&lt;br /&gt;
&lt;br /&gt;
* [[/vcalendar_and_vcard_elements|&amp;amp;lt;vcard&amp;amp;gt;, &amp;amp;lt;vcalendar&amp;amp;gt;, &amp;amp;lt;vevent&amp;amp;gt; and &amp;amp;lt;vattr&amp;amp;gt;]] elements&lt;br /&gt;
&lt;br /&gt;
== Proposals for Web Controls 1.0 ==&lt;br /&gt;
&lt;br /&gt;
I have no current proposals for Web Controls 1.0.&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:vcalendar_and_vcard_elements&amp;diff=9485</id>
		<title>User:Matthew Raymond:vcalendar and vcard elements</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:vcalendar_and_vcard_elements&amp;diff=9485"/>
		<updated>2014-03-07T17:40:31Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:vcalendar and vcard elements to User:Matthew Raymond/vcalendar and vcard elements: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User:Matthew Raymond/vcalendar and vcard elements]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/vcalendar_and_vcard_elements&amp;diff=9484</id>
		<title>User:Matthew Raymond/vcalendar and vcard elements</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/vcalendar_and_vcard_elements&amp;diff=9484"/>
		<updated>2014-03-07T17:40:31Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:vcalendar and vcard elements to User:Matthew Raymond/vcalendar and vcard elements: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;ll write a detailed description later. Until then, see my [http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2005-February/003111.html Markup for vCalendar and vCard] post in the mailing list archive.&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:date_element&amp;diff=9483</id>
		<title>User:Matthew Raymond:date element</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:date_element&amp;diff=9483"/>
		<updated>2014-03-07T17:39:30Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:date element to User:Matthew Raymond/date element: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User:Matthew Raymond/date element]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/date_element&amp;diff=9482</id>
		<title>User:Matthew Raymond/date element</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/date_element&amp;diff=9482"/>
		<updated>2014-03-07T17:39:30Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:date element to User:Matthew Raymond/date element: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Date elements are used to provide date values for [[Web Forms 2.0]] compliant [[user agent]]s, and to provide a means for those same dates to be displayed in HTML 4.01 compliant browsers.&lt;br /&gt;
&lt;br /&gt;
The date information provided by the date element can be used for scheduling purposes, or for any other date-related purposes. The actual data is contained in the element&#039;s value attribute.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
:&amp;amp;lt;date value=&amp;quot;2005-01-25&amp;quot;&amp;amp;gt;25-Jan-2005&amp;amp;lt;/date&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example, the suggested rendering on a [[Web Forms 2.0]] compliant user agent would be the date contained in value in a localized format. For example, the browser may render &amp;quot;January 25th, 2005&amp;quot;. Alternatively, it would also be valid to render the child contents of the element, with the localized date displayed as a tooltip. The second rendering, however, is not recommended.&lt;br /&gt;
&lt;br /&gt;
The child contents of a date element are intended for legacy user agent support. Although they can be used by a Web Forms 2.0 compliant browser, the primary intent is that a localized date value be rendered in the place of the contents.&lt;br /&gt;
&lt;br /&gt;
If the value attribute of a date element is not specified, the user agent must check to see if the child contents are a text string containing an [[ISO 8601]] formatted date, and if so, the value of the value attribute should default to that of the child contents.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
:&amp;amp;lt;date&amp;amp;gt;2010-02-14&amp;amp;lt;/date&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above example may be rendered as &amp;quot;February 14th, 2010&amp;quot;, or some other localized date string.&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:dataentry_element&amp;diff=9481</id>
		<title>User:Matthew Raymond:dataentry element</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:dataentry_element&amp;diff=9481"/>
		<updated>2014-03-07T17:39:08Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:dataentry element to User:Matthew Raymond/dataentry element: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User:Matthew Raymond/dataentry element]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/dataentry_element&amp;diff=9480</id>
		<title>User:Matthew Raymond/dataentry element</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/dataentry_element&amp;diff=9480"/>
		<updated>2014-03-07T17:39:08Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:dataentry element to User:Matthew Raymond/dataentry element: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;amp;lt;dataentry&amp;amp;gt; element is just like &amp;amp;lt;input&amp;amp;gt;, with three exceptions:&lt;br /&gt;
&lt;br /&gt;
* It doesn&#039;t have the depreciated attributes.&lt;br /&gt;
* It has no |alt| attribute, but instead contains alternative contents as child nodes for legacy support.&lt;br /&gt;
* It requires a closing tag (&amp;quot;&amp;amp;lt;/dataentry&amp;amp;gt;&amp;quot;).&lt;br /&gt;
* It must contain at least one form control. If &amp;amp;lt;/dataentry&amp;amp;gt; has a defined |name| attribute, then it must contain at least one form control with a defined |name| attribute.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example for the three &amp;amp;lt;select&amp;amp;gt; scenario:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;dataentry type=&amp;quot;date&amp;quot; id=&amp;quot;d1&amp;quot; name=&amp;quot;d1&amp;quot; value=&amp;quot;2005-02-09&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;select name=&amp;quot;d1_day&amp;quot;&amp;amp;gt;&amp;amp;lt;!-- Options --&amp;amp;gt;&amp;amp;lt;/select&amp;amp;gt; /&lt;br /&gt;
  &amp;amp;lt;select name=&amp;quot;d1_month&amp;quot;&amp;amp;gt;&amp;amp;lt;!-- Options --&amp;amp;gt;&amp;amp;lt;/select&amp;amp;gt; /&lt;br /&gt;
  &amp;amp;lt;select name=&amp;quot;d1_year&amp;quot;&amp;amp;gt;&amp;amp;lt;!-- Options --&amp;amp;gt;&amp;amp;lt;/select&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/dataentry&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example for users of jscalendar:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;dataentry type=&amp;quot;date&amp;quot; id=&amp;quot;sel1_WF2&amp;quot; name=&amp;quot;date1&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;sel1&amp;quot; name=&amp;quot;date1&amp;quot; size=&amp;quot;30&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;input type=&amp;quot;reset&amp;quot; value=&amp;quot; ... &amp;quot; onclick=&amp;quot;return showCalendar(&#039;sel1&#039;, &#039;%Y-%m-%d&#039;);&amp;quot;&amp;amp;gt;&lt;br /&gt;
  YYYY-MM-DD&lt;br /&gt;
 &amp;amp;lt;/dataentry&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pros==&lt;br /&gt;
&lt;br /&gt;
# The &amp;amp;lt;dataentry&amp;amp;gt; element can allow for a far greater range of legacy fallback than &amp;amp;lt;input&amp;amp;gt;.&lt;br /&gt;
# Because the |type| is defined in an attribute, &amp;amp;lt;dataentry&amp;amp;gt; can be used for input types in later specifications, or for vendor-specific input types.&lt;br /&gt;
# The element is designed in both semantics and structure to encourages the use of &amp;amp;lt;input&amp;amp;gt; in simple cases where legacy fallback needs are minimal.&lt;br /&gt;
# The element is designed only to prevent the presentation of its child elements. It does not require user agents to delete contents from the DOM or suppress Javascript execution.&lt;br /&gt;
# Because it has the same attributes as &amp;amp;lt;input&amp;amp;gt;, there&#039;s nothing new to learn except the inclusion of fallback content.&lt;br /&gt;
&lt;br /&gt;
==Cons==&lt;br /&gt;
&lt;br /&gt;
# The size of a form&#039;s elements collection in Javascript may differ between user agents.&lt;br /&gt;
# There may be legacy Javascript issues that cause script failure when generating unrecognized elements.&lt;br /&gt;
# When creating an &amp;amp;lt;dataentry&amp;amp;gt; element, you should be able to test for the correct element type by checking to see if it has a .type property, but I can&#039;t be 100% certain.&lt;br /&gt;
# Some unneeded Javascript overhead on WF2 clients.&lt;br /&gt;
# CSS styling for &amp;amp;lt;dataentry&amp;amp;gt; can&#039;t be done directly because user agents that support unrecognized elements may use the styling instead of ignoring the &amp;amp;lt;dataentry&amp;amp;gt; as intended.&lt;br /&gt;
&lt;br /&gt;
==Solutions For Cons==&lt;br /&gt;
&lt;br /&gt;
# A simple method could be added to the DOM that would set whether a form control is include in the .elements collection. A function could then be run when the page loads to hide the &amp;amp;lt;dataentry&amp;amp;gt; elements from the collection.&lt;br /&gt;
# This is a general issue affecting all new elements we introduce.&lt;br /&gt;
# May not be an issue, but I&#039;d like to hear from an expert.&lt;br /&gt;
# Ian seems to feel this is a non-issue, so I won&#039;t argue with him.&lt;br /&gt;
# I&#039;m considering a pseudo-class (&amp;quot;:controltype()&amp;quot; or &amp;quot;:dom(attr, val)&amp;quot;?) that should allow a web author to style &amp;amp;lt;dataentry type=&amp;quot;controltype&amp;quot;&amp;amp;gt; when the control type is supported. I&#039;m still working on this concept, though, and I&#039;m wondering if a more general and more powerful pseudo-class can&#039;t be developed.&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:altinput_element&amp;diff=9479</id>
		<title>User:Matthew Raymond:altinput element</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond:altinput_element&amp;diff=9479"/>
		<updated>2014-03-07T17:38:45Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:altinput element to User:Matthew Raymond/altinput element: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User:Matthew Raymond/altinput element]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/altinput_element&amp;diff=9478</id>
		<title>User:Matthew Raymond/altinput element</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Matthew_Raymond/altinput_element&amp;diff=9478"/>
		<updated>2014-03-07T17:38:45Z</updated>

		<summary type="html">&lt;p&gt;SamB: SamB moved page User:Matthew Raymond:altinput element to User:Matthew Raymond/altinput element: Make actual subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;amp;lt;altinput&amp;amp;gt; element is intended to be a possible alternative to my earlier [[User:Matthew_Raymond:dataentry_element|&amp;amp;lt;dataentry&amp;amp;gt;]] element.&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;lt;altinput&amp;amp;gt; element is a way of accomplishing the same goals as &amp;amp;lt;dataentry&amp;amp;gt; while ensuring that the  size of a form&#039;s elements collection and the position of controls within it doesn&#039;t change between legacy and WF2 browsers. Rather than the element itself being a form control, &amp;amp;lt;altinput&amp;amp;gt; instead performs the following:&lt;br /&gt;
&lt;br /&gt;
* If it has a control with an |id| attribute equal to its |for| attribute, then it attempts to assign its own |type| attribute value to the |type| of the specified control.&lt;br /&gt;
* If the |type| is not supported, then the &amp;amp;lt;altinput&amp;amp;gt; acts as nothing more than a &amp;amp;lt;span&amp;amp;gt;.&lt;br /&gt;
* However, if the |type| is supported, the control has its |type| changed and the entire contents of the &amp;amp;lt;altinput&amp;amp;gt; element, with the exception of specified control, are not be rendered.&lt;br /&gt;
&lt;br /&gt;
The result is that, in most cases, &amp;amp;lt;altinput&amp;amp;gt; acts almost exactly like &amp;amp;lt;dataentry&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example for the three &amp;amp;lt;select&amp;amp;gt; scenario:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;altinput for=&amp;quot;d1&amp;quot; type=&amp;quot;date&amp;quot; value=&amp;quot;2005-02-09&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;input type=&amp;quot;hidden&amp;quot; id=&amp;quot;d1&amp;quot; name=&amp;quot;d1&amp;quot; /&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;select name=&amp;quot;d1_day&amp;quot;&amp;amp;gt;&amp;amp;lt;!-- Options --&amp;amp;gt;&amp;amp;lt;/select&amp;amp;gt; /&lt;br /&gt;
  &amp;amp;lt;select name=&amp;quot;d1_month&amp;quot;&amp;amp;gt;&amp;amp;lt;!-- Options --&amp;amp;gt;&amp;amp;lt;/select&amp;amp;gt; /&lt;br /&gt;
  &amp;amp;lt;select name=&amp;quot;d1_year&amp;quot;&amp;amp;gt;&amp;amp;lt;!-- Options --&amp;amp;gt;&amp;amp;lt;/select&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/altinput&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example for users of jscalendar:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;altinput for=&amp;quot;sel1&amp;quot; type=&amp;quot;date&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;sel1&amp;quot; name=&amp;quot;date1&amp;quot; size=&amp;quot;30&amp;quot; /&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;input type=&amp;quot;reset&amp;quot; value=&amp;quot; ... &amp;quot; onclick=&amp;quot;return showCalendar(&#039;sel1&#039;, &#039;%Y-%m-%d&#039;);&amp;quot;&amp;amp;gt;&lt;br /&gt;
  YYYY-MM-DD&lt;br /&gt;
 &amp;amp;lt;/altinput&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pros==&lt;br /&gt;
&lt;br /&gt;
# The size of a form&#039;s elements collection in Javascript never changes.&lt;br /&gt;
# The &amp;amp;lt;altinput&amp;amp;gt; element can allow for a far greater range of legacy fallback than &amp;amp;lt;input&amp;amp;gt; alone.&lt;br /&gt;
# Because the |type| is defined in an attribute, &amp;amp;lt;altinput&amp;amp;gt; can be used for input types in later specifications, or for vendor-specific input types.&lt;br /&gt;
# Because the elemnt requires a child form control, it encourages the use of &amp;amp;lt;input&amp;amp;gt; alone in simple cases where legacy fallback needs are minimal.&lt;br /&gt;
# The element is designed only to prevent the presentation of its child elements. It does not require user agents to delete contents from the DOM or suppress Javascript execution.&lt;br /&gt;
&lt;br /&gt;
==Cons==&lt;br /&gt;
&lt;br /&gt;
# It&#039;s slightly more complicated to use than &amp;amp;lt;dataentry&amp;amp;gt;.&lt;br /&gt;
# In some situations, you must use a hidden &amp;amp;lt;input&amp;amp;gt; control as the target of the &amp;amp;lt;altinput&amp;amp;gt; element&#039;s |for| attribute.&lt;br /&gt;
# It may still inherit some minor issues from &amp;amp;lt;dataentry&amp;amp;gt;.&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Component_Model_Use_Cases&amp;diff=6508</id>
		<title>Component Model Use Cases</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Component_Model_Use_Cases&amp;diff=6508"/>
		<updated>2011-06-09T19:01:18Z</updated>

		<summary type="html">&lt;p&gt;SamB: /* Shadow DOM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A canonical set of uses cases that represents the set of problems we are trying to solve by implementing a component model. For implementation details, see [http://dev.w3.org/2006/xbl2/Overview.html XBL2 Spec].&lt;br /&gt;
&lt;br /&gt;
This document is broken out into two sections: &#039;&#039;&#039;general use cases&#039;&#039;&#039; provide insight into how the component model could be used; &#039;&#039;&#039;specific use cases&#039;&#039;&#039; are interesting scenarios within the general use cases that should be treated as constraints/requirements, imposed on the specification/implementation of the component model.&lt;br /&gt;
&lt;br /&gt;
=General Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Built-in HTML Elements==&lt;br /&gt;
&lt;br /&gt;
Many non-trivial (i.e. with additional behavior and styling beyond the standard box model) elements that exist in HTML today could be implemented using HTML/CSS/JS. [https://wiki.mozilla.org/Gecko:Home_Page Gecko] already takes this approach pretty far. It makes sense to provide a standardized way to accomplish this, with the short-term goals of reducing the size of browsers C++ code and making new element implementation easier, and the long-term goal of converging built-in HTML element implementations across browsers.&lt;br /&gt;
&lt;br /&gt;
== Custom Widget System ==&lt;br /&gt;
&lt;br /&gt;
As it is today (Jan 1, 2011), pretty much every Javascript framework has a widget system (see http://jqueryui.com/, http://sproutcore.com/, http://o.dojotoolkit.org/projects/dijit, http://cappuccino.org/, http://code.google.com/webtoolkit/, http://code.google.com/closure/library/, http://www.sencha.com/ as just a few examples).  All of these these widget systems are framework-specific and mostly incompatible with each other. &lt;br /&gt;
Because the Web platform doesn&#039;t provide a well-functioning way to extend HTML elements, all of these tend to build a parallel widget space, where widget objects act as proxies to DOM objects, and the extensibility exists only within that parallel widget space. A DOM-based component model should aim to eliminate the need for this parallel space and allow widget systems to just use DOM with the goals of:&lt;br /&gt;
* reducing the amount of widget-space-related code written in each framework&lt;br /&gt;
* providing better, leak-free abstraction for widgets&lt;br /&gt;
* providing interoperable API to allow widgets from different frameworks to coexist and integrate.&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
* provide a uniform way (i.e. DOM) to declare widget APIs&lt;br /&gt;
* encapsulate widget implementation details&lt;br /&gt;
* enable control over how styles and events outside of a widget affect it&lt;br /&gt;
* enable widget styling primitives&lt;br /&gt;
* asynchronously instantiate and initialize widgets (for instance, display a widget without starting up a script context, then progressively enhance with script).&lt;br /&gt;
* allow seamless reuse a widget written using various libraries or frameworks&lt;br /&gt;
* allow using widgets declaratively, with minimal knowledge of the underlying implementation&lt;br /&gt;
* provide a way to create new widgets by extending existing widgets&lt;br /&gt;
&lt;br /&gt;
Needs:&lt;br /&gt;
* content element (output ports)&lt;br /&gt;
* attachment using CSS and DOM&lt;br /&gt;
* separate instantiation and binding phases (or another way to allow asynchronous binding)&lt;br /&gt;
* attribute/pseudo forwarding&lt;br /&gt;
* declarative templating/binding&lt;br /&gt;
&lt;br /&gt;
Could use:&lt;br /&gt;
* dynamic attachment/detachment&lt;br /&gt;
* template inheritance&lt;br /&gt;
* supporting form-control like behavior like &amp;quot;disable&amp;quot; HTML attribute, &amp;quot;form&amp;quot; JS property, etc.&lt;br /&gt;
&lt;br /&gt;
Doesn&#039;t care:&lt;br /&gt;
* mutable templates&lt;br /&gt;
* xml:base handling&lt;br /&gt;
&lt;br /&gt;
Interesting scenarios:&lt;br /&gt;
* Implement a &amp;quot;polaroid frame&amp;quot; widget? This widget, when bound to any element would display its contents in a Polaroid(tm)-like frame.&lt;br /&gt;
* Suppose the widget system has a centralized &amp;quot;settings&amp;quot; widget, with which all other widgets should communicate to add their settings. Implement this communication, provided that all widgets are opaque elements.&lt;br /&gt;
* Implement a &amp;quot;tab set&amp;quot; widget. As you add &amp;quot;tabs&amp;quot; to it, tab titles appear in a row at the top, and tab contents appear in the main area, only visible when the corresponding tab title is selected.&lt;br /&gt;
&lt;br /&gt;
==Layout Manager==&lt;br /&gt;
&lt;br /&gt;
Does:&lt;br /&gt;
* provide a framework for client-side restructuring of content to accommodate layout&lt;br /&gt;
* support both imperative a declarative layout models&lt;br /&gt;
* provide templating/theming capabilities&lt;br /&gt;
&lt;br /&gt;
Needs:&lt;br /&gt;
* content element (output ports)&lt;br /&gt;
* attachment using CSS and DOM&lt;br /&gt;
* separate instantiation and binding phases (or another way to allow asynchronous binding)&lt;br /&gt;
&lt;br /&gt;
Could use:&lt;br /&gt;
&lt;br /&gt;
Doesn&#039;t care:&lt;br /&gt;
* mutable templates&lt;br /&gt;
* xml:base handling&lt;br /&gt;
&lt;br /&gt;
==Specialized Markup Languages==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to imagine the component model to be used for lightweight implementations of specialized markup languages, such as MathML. &lt;br /&gt;
&#039;&#039;&#039;This section needs work.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Specific Use Cases=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Shadow DOM==&lt;br /&gt;
A component model should allow a component to hide its implementation details from the consumer. For instance, consider this bit of code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;range&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The last thing the user of this element would expect is being able to walk down the DOM subtree of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; element and find the thumb element inside:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;range&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, that&#039;s not what the code managing the range slider would want to happen. Thus, the &#039;&#039;&#039;shadow DOM&#039;&#039;&#039; is &#039;&#039;a way to implement a DOM subtree that is rendered as part of the document, but is not accessible by traversing the document tree&#039;&#039;. Shadow DOM provides the necessary level of isolation between component and non-component parts of the DOM tree and is the fundamental part of the component model.&lt;br /&gt;
&lt;br /&gt;
==Dynamic Binding Mechanism==&lt;br /&gt;
Being able to apply and unapply a shadow DOM tree, its style information and the code that manages them as one atomic action seems important. For instance, changing the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; attribute of the input element immediately triggers the change of how the element looks and behaves. One can view this described in CSS as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input[type=&#039;text&#039;] {&lt;br /&gt;
    binding: url(http://example.com/input/text/);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
input[type=&#039;range&#039;] {&lt;br /&gt;
    binding: url(http://example.com/input/range/);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code snippet above, it is implied that the shadow subtree, styles, and code are applied/unapplied atomically and dynamically as the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; attribute value changes.&lt;br /&gt;
&lt;br /&gt;
TODO: We need to be very careful about executing JavaScript at the behest of CSS.  Browsers vendors that have tried that in the past have later come to regret that decision.&lt;br /&gt;
&lt;br /&gt;
==Multiple Shadow DOM Subtrees On Element==&lt;br /&gt;
A new component might want to build upon an existing component to provide new functionality. For example, I might want to turn the &amp;lt;code&amp;gt;input type=&amp;quot;range&amp;quot;&amp;lt;/code&amp;gt; into a dial, rather than a slider. The dial code is implemented as a shadow DOM subtree and is bound to the element like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* CSS */&lt;br /&gt;
input[type=&#039;range&#039;].dial {&lt;br /&gt;
    binding: url(http://example.com/dial/);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use my dial, I have this bit of code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setDialMode(id, dial)&lt;br /&gt;
{&lt;br /&gt;
    var input = document.getElementById(id);&lt;br /&gt;
    if (dial)&lt;br /&gt;
      input.classList.add(&#039;dial&#039;);&lt;br /&gt;
    else&lt;br /&gt;
      input.classList.remove(&#039;dial&#039;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user&#039;s expectations is that the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; element turns into a dial once the &amp;lt;code&amp;gt;dial&amp;lt;/code&amp;gt; class is set and reverts back to the slider once it&#039;s removed. Given that slider itself is implemented as a shadow DOM subtree,  this indicates that either:&lt;br /&gt;
# &#039;&#039;&#039;Mltiple shadow subtrees could exist on an element at the same time with only one subtree rendered&#039;&#039;&#039;. This implies some sort of &amp;quot;selector memory&amp;quot; ability, which is completely foreign to how things work in the browser today.&lt;br /&gt;
# &#039;&#039;&#039;A shadow subtree is destroyed and rebuilt every time selector applies/unapplies&#039;&#039;&#039;. This is also bad, because destroying discards any modifications to the subtree that may have occurred during its lifetime. In addition, this approach seems very prone to performance troubles.&lt;br /&gt;
&lt;br /&gt;
==User Agent-Level Attachment==&lt;br /&gt;
Since the component model is used to implement built-in HTML elements, there has to be a way apply subtree/style/code at the UA level. The attachment at this level has to satisfy these criteria:&lt;br /&gt;
# It should happen before any other component attachment (like UA-level stylesheets).&lt;br /&gt;
# It should allow the component code to access API methods that are accessible only to the UA-level attachment. For instance, a &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt; element implementation may need to operate on the native video frame. Direct access to the video frame should not be allowed outside of the UA-level components.&lt;br /&gt;
# It should allow the component implementation details to be completely hidden. There should be no way to detect whether an HTML element is built using the component model.&lt;br /&gt;
&lt;br /&gt;
==Applying stylesheets to shadow DOM subtree==&lt;br /&gt;
Styles, defined by the author should not reach into the shadow DOM subtree, at least not by default. Otherwise, the items inside of the built-in HTML elements would react to general style selectors. However, the user agent and user stylesheets must always apply. Otherwise, built-in HTML elements inside of another shadow DOM would lose they styling.&lt;br /&gt;
&lt;br /&gt;
==Styling Using Pseudo Elements==&lt;br /&gt;
To replicate existing functionality, there should be a way to apply styles to the elements in shadow DOM subtree using pseudo elements. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input[type=&#039;range&#039;]::-webkit-slider-thumb&lt;br /&gt;
{&lt;br /&gt;
    background-color: Cyan;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Currently, this matches the thumb in the slider, allowing you to style it. This capability should be available in the new component model to support these existing use cases. This implies that there must be a way to associate an arbitrary string with an element in a shadow subtree, which is matched as a pseudo-element value on the host element of the shadow subtree.&lt;br /&gt;
&lt;br /&gt;
==Nesting Pseudo Elements and Mixing with Pseudo Classes==&lt;br /&gt;
An element that&#039;s exposed to the outside of the shadow DOM with a pseudo-element may also have applicable pseudo-classes. For example, if an element is a button, the user may want to be able to style its various states, exposed via dynamic pseudo-classes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
audio::-webkit-controls-play-button:active {&lt;br /&gt;
    background-color: Red;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also, it is useful to be able to style shadow DOM subtrees, nested within each other:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
audio::-webkit-controls-timeline::-webkit-slider-thumb:active {&lt;br /&gt;
   border: 1px Red solid;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The chain of column and double-column delimiters gets confusing quickly:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
audio::-webkit-controls-timeline:focused::-webkit-slider-thumb:active {&lt;br /&gt;
   border: 1px Red solid;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The example above speaks in favor of perhaps matching shadow DOM subtree elements using a (wholly different and new) special selector. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
audio part(-webkit-controls-timeline):focused part(-webkit-slider-thumb):active {&lt;br /&gt;
   border: 1px Red solid;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Events and Shadow Subtrees==&lt;br /&gt;
Events, originated in shadow subtrees, should, in most cases, escape into the main document. For example, if I click on the thumb of the slider in the &amp;lt;code&amp;gt;input[type=range]&amp;lt;/code&amp;gt;, I expect to hear all of the respective mouse events at the input. One important notion is that the target of the event and the event object itself should be changed to not to reveal the shadow subtree. In the example above, the value of &amp;lt;code&amp;gt;event.target&amp;lt;/code&amp;gt; in the document should be the input, not the thumb.&lt;br /&gt;
&lt;br /&gt;
==Focus and Shadow Subtrees==&lt;br /&gt;
Elements in shadow subtrees can get the input focus. Tab-traversal of elements in the page should include elements in shadow subtrees (subject to the typical constraints—that the elements can have the focus, are visible, and so on.) When an element is projected through an output port, the tab-traversal order may skip from an element in the shadow tree, to an output target element in another part of the tree, and back to a subsequent element in the shadow tree.&lt;br /&gt;
&lt;br /&gt;
Some components, for example &amp;lt;code&amp;gt;input[type=&amp;quot;text&amp;quot;]&amp;lt;/code&amp;gt;, act as monolithic focus targets. Event retargeting of focus and blur events emanating from the shadow tree helps maintain this impression. When the component is focussed, for example by calling the &amp;lt;code&amp;gt;focus&amp;lt;/code&amp;gt; function in JavaScript, the component needs to project that focus onto an element it contains. Ideally components could also affect the &amp;lt;code&amp;gt;:focus&amp;lt;/code&amp;gt; CSS pseudo-class.&lt;br /&gt;
&lt;br /&gt;
==Near-native Performance==&lt;br /&gt;
HTML elements, built using the component system should perform as well as if they were implemented natively and have similar memory consumption characteristics.&lt;br /&gt;
&lt;br /&gt;
==Conceptual Similarity to Ordinary Markup==&lt;br /&gt;
There are two ways to build a DOM tree, using HTML (a declarative API) and using DOM methods (an imperative API). It seems like a &#039;&#039;good thing&#039;&#039; to allow developers having the same options for building a shadow DOM subtree. Both options should feel as similar as possible to creating an ordinary DOM tree.&lt;br /&gt;
&lt;br /&gt;
==Template/Stencil Mental Model of a Declarative API==&lt;br /&gt;
Since both widgets and built-in HTML elements are meant to have multiple instances, created and destroyed at will, it appears logical to adapt the template/stencil mental model of how a shadow DOM subtree is instantiated:&lt;br /&gt;
* the subtree is built from some template of a widget/element;&lt;br /&gt;
* the subtree is used to manage behavior or widget/element;&lt;br /&gt;
* the subtree is destroyed with the widget/element.&lt;br /&gt;
&lt;br /&gt;
==Reacting to bound element state change==&lt;br /&gt;
A widget may want to know if its state (focused/selected/activated) has changed. This can be accomplished by attaching an event listener to its &#039;&#039;light&#039;&#039; node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;binding element=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;template&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;I am asleep&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;/template&amp;gt;&lt;br /&gt;
        &amp;lt;implementation&amp;gt;&lt;br /&gt;
            ({&lt;br /&gt;
                xblEnteredDocument: function()&lt;br /&gt;
                {&lt;br /&gt;
                    var tree = this.shadowTree;&lt;br /&gt;
                    this.boundElement.addEventListener(&amp;quot;DOMActivate&amp;quot;,&lt;br /&gt;
                        function()&lt;br /&gt;
                        {&lt;br /&gt;
                            tree.firstChild.textContent = &amp;quot;I AM AWAKE&amp;quot;;&lt;br /&gt;
                        }, false);&lt;br /&gt;
                }&lt;br /&gt;
            })&lt;br /&gt;
        &amp;lt;/implementation&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reacting to bound element attribute changes==&lt;br /&gt;
A widget may want to know when its attributes are changed. Similarly to the state change, this can be accomplished by attaching a DOM mutation event listener to its &#039;&#039;light&#039;&#039; node (see example for the state change and imagine a DOM mutation event listener being registered instead).&lt;br /&gt;
&lt;br /&gt;
==Mindless Forwarding of the Attribute Changes==&lt;br /&gt;
In cases where the meaning of the attribute needs to be reflected by an element in the shadow DOM subtree, forwarding attribute changes mindlessly (without registering listeners and generally executing script) is useful:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;binding element=&amp;quot;myinput&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;template&amp;gt;&lt;br /&gt;
            &amp;lt;h2&amp;gt;O HAI! MY INPUT IZ TEH AWSUM&amp;lt;/h2&amp;gt;&lt;br /&gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; attributes=&amp;quot;value disabled readonly&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;/template&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;myinput&amp;gt;&amp;lt;/myinput&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using Shadow DOM Boundary for Isolation==&lt;br /&gt;
The boundary between shadow and light DOM presents an interesting opportunity to use this boundary for script and DOM subtree isolation. For example, binding trusted code to an element in an untrusted tree could be used for clearer separation between control and data channel in the document.&lt;br /&gt;
&lt;br /&gt;
There are three cases worth considering:&lt;br /&gt;
&lt;br /&gt;
# The parent document trusts its components but the components do not trust the parent document.&lt;br /&gt;
# The parent document does not trust its components but the components does trust the parent document.&lt;br /&gt;
# Neither the parent document nor the components trust the other.&lt;br /&gt;
&lt;br /&gt;
===Parent trusts component but not vice versa===&lt;br /&gt;
&lt;br /&gt;
Because the components are embedded into the parent document, the parent document will be able to control how the component appears to the user.  However, the component could hope to hide its internal state from the parent document.  More specifically, imagine that the component contains a secret value, such as a capability for accessing a web service.  The component should be able to keep this value confidential from the parent document.&lt;br /&gt;
&lt;br /&gt;
===Component trusts parent but not vice versa===&lt;br /&gt;
&lt;br /&gt;
Much like embedding an iframe, a parent document should be able to include an untrusted component without abandoning its security.  For example, imagine a video hosting web site provides a video player component that can be embedded in other documents.  Those documents should be able to embed the video player component without allowing the video player to inject arbitrary content into the parent page.&lt;br /&gt;
&lt;br /&gt;
===Mutual distrust===&lt;br /&gt;
&lt;br /&gt;
If the component system achieves the above two use cases in a sufficiently generic manner, the component model should also allow the parent document and the component to be mutually distrusting.  For example, the video player described above could contain a capability for accessing a web service as above.&lt;br /&gt;
&lt;br /&gt;
==Faster-than-imperative Parsing of Shadow DOM Markup==&lt;br /&gt;
It should be possible for browsers to use declarative shadow DOM APIs to achieve performance than the imperative APIs, because the subtree template can be pre-parsed and optimized for cloning + wire-up instead of building from scratch for every instance.&lt;br /&gt;
&lt;br /&gt;
==Tens of Thousands of Widgets==&lt;br /&gt;
The implementation should be able to efficiently handle a very large number of instances from the same template (see [http://lists.w3.org/Archives/Public/public-webapps/2010OctDec/0979.html discussion]).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;binding element=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;style scoped&amp;gt;&lt;br /&gt;
            div.pretty {&lt;br /&gt;
                background-color: Pretty;&lt;br /&gt;
            }&lt;br /&gt;
        &amp;lt;/style&amp;gt;&lt;br /&gt;
        &amp;lt;template&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;pretty&amp;quot;&amp;gt;Pretty is, pretty does.&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/template&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;&lt;br /&gt;
        for(var i = 0; i &amp;lt; 20 * 1000; ++i)&lt;br /&gt;
            document.body.appendChild(document.createElement(&#039;div&#039;));&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Insertion Points, Not Containers==&lt;br /&gt;
Output ports need to be insertion points, not cointainers. If the output port is a container (that is, an existing element in the shadow subtree is designated as a place to add the &amp;quot;light&amp;quot; nodes), some layout scenarios aren&#039;t possible. In this example, you can not use flexbox to layout all of the paragraphs in the story:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;template&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;Once upon a time,&lt;br /&gt;
    &amp;lt;content includes=&amp;quot;p&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;And they lived happily ever after&lt;br /&gt;
&amp;lt;/template&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is useful to think of the output port as a [https://developer.mozilla.org/en/DOM:range.collapsed collapsed range].&lt;br /&gt;
&lt;br /&gt;
==Shadow Subtree Mutation==&lt;br /&gt;
Because content element is an insertion point, what happens when the elements around it change? What happens when the insertion point moves?&lt;br /&gt;
* &#039;&#039;&#039;Modifying includes attribute&#039;&#039;&#039;. What happens when you modify the &amp;lt;code&amp;gt;includes&amp;lt;/code&amp;gt; element on the output port? &lt;br /&gt;
* &#039;&#039;&#039;Nested shadow subtrees&#039;&#039;&#039;. Suppose you have two bindings, one applied inside another:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;binding element=&amp;quot;div#foo&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;template&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;&lt;br /&gt;
                &amp;lt;content&amp;gt;&amp;lt;/content&amp;gt;&lt;br /&gt;
            &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;/template&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;binding element=&amp;quot;div#bar&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;template&amp;gt;&lt;br /&gt;
            &amp;lt;div&amp;gt;&lt;br /&gt;
                &amp;lt;div id=&amp;quot;foo&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;span&amp;gt;Blah&amp;lt;/span&amp;gt;&lt;br /&gt;
                    &amp;lt;content&amp;gt;&amp;lt;/content&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/template&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;foo&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt;Monkeys&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sequence of actions:&lt;br /&gt;
# Add a &amp;lt;code&amp;gt;div&amp;lt;/code&amp;gt; element to &amp;lt;code&amp;gt;div#bar&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Move &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt; element in &amp;lt;code&amp;gt;div#bar&amp;lt;/code&amp;gt; template as the first child of &amp;lt;code&amp;gt;div&amp;lt;/code&amp;gt;&lt;br /&gt;
What happens?&lt;br /&gt;
&lt;br /&gt;
==Dynamicity of Rules==&lt;br /&gt;
As XBL2 spec&#039;d today, the [http://dev.w3.org/2006/xbl2/Overview.html#includes includes] attribute is fully dynamic. That is, changing this attribute results in node redistribution. Being able to control node distribution from outside of the shadow subtree seems like a useful feature. Consider this example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;binding element=&amp;quot;ul.news&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;template&amp;gt;&lt;br /&gt;
            &amp;lt;h2&amp;gt;Breaking News&amp;lt;/h2&amp;gt;&lt;br /&gt;
            &amp;lt;ul id=&amp;quot;breaking&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;content includes=&amp;quot;li.breaking&amp;quot;&amp;gt;&amp;lt;/content&amp;gt;&lt;br /&gt;
            &amp;lt;/ul&amp;gt;&lt;br /&gt;
            &amp;lt;h2&amp;gt;Other News&amp;lt;/h2&amp;gt;&lt;br /&gt;
            &amp;lt;ul id=&amp;quot;other&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;content&amp;gt;&amp;lt;/content&amp;gt;&lt;br /&gt;
            &amp;lt;/ul&amp;gt;&lt;br /&gt;
        &amp;lt;/template&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;ul class=&amp;quot;news&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;li class=&amp;quot;breaking&amp;quot;&amp;gt;Santa seen crossing Atlantic&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;Pies pose serious health risk, scientists say&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, the importance of the news item is controlled outside of the shadow subtree. By setting/removing class &amp;lt;code&amp;gt;breaking&amp;lt;/code&amp;gt; on a news item, the consumer of the binding can move it in and out of the breaking news section. Implementing this without dynamic rules seems cumbersome and non-trivial.&lt;br /&gt;
&lt;br /&gt;
== Forwarding of the text content ==&lt;br /&gt;
&lt;br /&gt;
The native HTML &amp;amp;lt;option&amp;gt; element renders the textContent of all its children, but not the children themselves.  This seems like a mildly useful feature by itself, and would also be useful for completeness is demagicking the behavior of the element in browsers.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Category:Stubs&amp;diff=6459</id>
		<title>Category:Stubs</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Category:Stubs&amp;diff=6459"/>
		<updated>2011-05-26T01:05:19Z</updated>

		<summary type="html">&lt;p&gt;SamB: Created page with &amp;#039;These articles are stubs, and should be expanded.&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These articles are stubs, and should be expanded.&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Table_Summary&amp;diff=6457</id>
		<title>Table Summary</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Table_Summary&amp;diff=6457"/>
		<updated>2011-05-25T21:39:40Z</updated>

		<summary type="html">&lt;p&gt;SamB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
HTML 5 needs to find a solution to address the issue of providing explanatory descriptions, or summaries, of complex tables. This page attempts to document the research, proposed solutions, and arguments for and against each proposed technical solution.&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== data on table summary usage ===&lt;br /&gt;
The following research presents raw data on table summary attribute usage, with citation to sources:&lt;br /&gt;
* http://philip.html5.org/data/table-summary-values.html &lt;br /&gt;
&lt;br /&gt;
=== sorted common values of summary attributes ===&lt;br /&gt;
Analysis of the above raw data, collated by common values used for the summary attribute, sorted by number of domains that make use of a common value.&lt;br /&gt;
* http://philip.html5.org/data/table-summary-values-dotbot.html&lt;br /&gt;
&lt;br /&gt;
=== user studies ===&lt;br /&gt;
From http://lists.w3.org/Archives/Public/public-html/2009Aug/0111.html :&lt;br /&gt;
A usability study of the observation of a single blind user that Joshue recorded, in which the user stated that he thought the information provided by the summary was too much.&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=xMGBX8gAM6g#t=0m30s Youtube: HTML5 WG header/id test Video: Table 5]&lt;br /&gt;
&lt;br /&gt;
== Solutions ==&lt;br /&gt;
=== HTML4 summary Attribute ===&lt;br /&gt;
The summary attribute was the solution provided in HTML4.&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# Supported by existing screen reader software &lt;br /&gt;
#* Which screen reader software vendor? &lt;br /&gt;
#* Which software? &lt;br /&gt;
#* Which version(s)?&lt;br /&gt;
#* On which operating system(s)? &lt;br /&gt;
#* On what URL to an existing web page with a table element with a summary attribute?&lt;br /&gt;
{{Incomplete list}}&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
{{Incomplete list}}&lt;br /&gt;
&lt;br /&gt;
== Elsewhere ==&lt;br /&gt;
&lt;br /&gt;
This is also being discussed on the HTML WG wiki: http://esw.w3.org/topic/HTML/SummaryForTABLE&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Template:Incomplete_list&amp;diff=6456</id>
		<title>Template:Incomplete list</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Template:Incomplete_list&amp;diff=6456"/>
		<updated>2011-05-25T21:37:13Z</updated>

		<summary type="html">&lt;p&gt;SamB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# THIS LIST IS INCOMPLETE - please contribute by [{{fullurl:{{FULLPAGENAME}}|action=edit}} editing this wiki page].&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Pages with incomplete lists]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Template:Incomplete_list&amp;diff=6455</id>
		<title>Template:Incomplete list</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Template:Incomplete_list&amp;diff=6455"/>
		<updated>2011-05-25T21:35:43Z</updated>

		<summary type="html">&lt;p&gt;SamB: Created page with &amp;#039;# THIS LIST IS INCOMPLETE - please contribute by [{{fullurl:{{FULLPAGENAME}}|action=edit}} editing this wiki page].&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# THIS LIST IS INCOMPLETE - please contribute by [{{fullurl:{{FULLPAGENAME}}|action=edit}} editing this wiki page].&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Template:Stub&amp;diff=6454</id>
		<title>Template:Stub</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Template:Stub&amp;diff=6454"/>
		<updated>2011-05-25T20:47:44Z</updated>

		<summary type="html">&lt;p&gt;SamB: Add Category:Stubs &amp;amp; other tricks from http://en.wikipedia.org/w/index.php?title=Template:Stub&amp;amp;action=edit&amp;amp;oldid=304078838&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This article is a stub.&#039;&#039;&#039; You can help the whatwg.org wiki by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it]. &amp;lt;includeonly&amp;gt;[[Category:Stubs]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>SamB</name></author>
	</entry>
</feed>