- From: Simon Pieters via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 06 Mar 2012 11:42:41 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html4-differences In directory hutz:/tmp/cvs-serv1173 Modified Files: Overview.src.html Log Message: document api changes from dom2 html Index: Overview.src.html =================================================================== RCS file: /sources/public/html5/html4-differences/Overview.src.html,v retrieving revision 1.157 retrieving revision 1.158 diff -u -d -r1.157 -r1.158 --- Overview.src.html 5 Mar 2012 15:42:11 -0000 1.157 +++ Overview.src.html 6 Mar 2012 11:42:39 -0000 1.158 @@ -599,7 +599,7 @@ <code data-anolis-spec=html title=attr-fs-formaction>formaction</code>, <code data-anolis-spec=html title=attr-fs-formenctype>formenctype</code>, <code data-anolis-spec=html title=attr-fs-formmethod>formmethod</code>, <code data-anolis-spec=html title=attr-fs-formnovalidate>formnovalidate</code>, and <code data-anolis-spec=html title=attr-fs-formtarget>formtarget</code> as new attributes. If present, they override - the <code data-anolis-spec=html title=attr-form-action>action</code>, <code data-anolis-spec=html title=attr-form-enctype>enctype</code>, <code data-anolis-spec=html title=attr-form-method>method</code>, + the <code data-anolis-spec=html title=attr-fs-action>action</code>, <code data-anolis-spec=html title=attr-fs-enctype>enctype</code>, <code data-anolis-spec=html title=attr-fs-method>method</code>, <code data-anolis-spec=html title=attr-fs-novalidate>novalidate</code>, and <code data-anolis-spec=html title=attr-fs-target>target</code> attributes on the <code data-anolis-spec=html>form</code> element.</p> @@ -614,7 +614,7 @@ within such a <code data-anolis-spec=html>style</code> element only apply to the local tree. <li><p>The <code data-anolis-spec=html>script</code> element has a new attribute called - <code data-anolis-spec=html>async</code> that influences script loading and execution. + <code data-anolis-spec=html title=attr-script-async>async</code> that influences script loading and execution. <li><p>The <code data-anolis-spec=html>html</code> element has a new attribute called <code data-anolis-spec=html title=attr-html-manifest>manifest</code> that points to an application cache manifest @@ -744,7 +744,7 @@ <li><p>The <code data-anolis-spec=html>address</code> element is now scoped by the nearest ancestor <code data-anolis-spec=html>article</code> - or <code data-anolis-spec>body</code> element.</p></li> + or <code data-anolis-spec=html>body</code> element.</p></li> <!-- AREA @@ -1491,7 +1491,7 @@ global attribute now allows multiple characters to be specified, which the user agent can choose from. - <p>The <code data-anolis-spec=html title=attr-form-action>action</code> + <p>The <code data-anolis-spec=html title=attr-fs-action>action</code> attribute on <code data-anolis-spec=html>form</code> is no longer allowed to have an empty URL. @@ -1518,7 +1518,7 @@ <p>The <code data-anolis-spec=html title=attr-dir>dir</code> global attribute now allows the value <code>auto</code>. - <p>The <code data-anolis-spec=html title=attr-form-enctype>enctype</code> + <p>The <code data-anolis-spec=html title=attr-fs-enctype>enctype</code> attribute on <code data-anolis-spec=html>form</code> now supports the value <code>text/plain</code>. @@ -1585,7 +1585,7 @@ data-anolis-spec=html>style</code> is no longer required if the scripting language is ECMAScript and the styling language is CSS, respectively.</p> - <p>The <code data-anolis-spec=html title=attr-img-usemap>usemap</code> + <p>The <code data-anolis-spec=html title=attr-hyperlink-usemap>usemap</code> attribute on <code data-anolis-spec=html>img</code> no longer takes a URL, but instead takes a <span data-anolis-spec=html>valid hash-name reference</span> to a <code data-anolis-spec=html>map</code> element. @@ -1608,7 +1608,7 @@ it has no useful function.</p></li> <li><p>The <code data-anolis-spec=html - title=attr-hyperlink-name>name</code> attribute on <code + title=attr-a-name>name</code> attribute on <code data-anolis-spec=html>a</code>. Authors can use the <code data-anolis-spec=html>id</code> attribute instead.</p></li> @@ -1668,7 +1668,7 @@ <li><code data-anolis-spec=html>isindex</code> usage can be replaced by usage of form controls. - <li><code data-anolis-spec=html>dir</code> has been obsoleted in favor of <code data-anolis-spec=html>ul</code>. + <li><code data-anolis-spec=html title=attr-dir>dir</code> has been obsoleted in favor of <code data-anolis-spec=html>ul</code>. </ul> <p>Finally the <code data-anolis-spec=html>noscript</code> element is only conforming in the @@ -1741,7 +1741,7 @@ <li><code data-anolis-spec=html title=attr-body-alink>alink</code>, <code data-anolis-spec=html title=attr-body-link>link</code>, <code data-anolis-spec=html title=attr-body-text>text</code> and <code data-anolis-spec=html title=attr-body-vlink>vlink</code> attributes on <code data-anolis-spec=html>body</code>. - <li><code data-anolis-spec=html title=attr-body-background>background</code> attribute on <code data-anolis-spec=html>body</code>. + <li><code data-anolis-spec=html title=attr-background>background</code> attribute on <code data-anolis-spec=html>body</code>. <li><code data-anolis-spec=html title=attr-body-bgcolor>bgcolor</code> attribute on <code data-anolis-spec=html>table</code>, <code data-anolis-spec=html>tr</code>, <code data-anolis-spec=html>td</code>, <code data-anolis-spec=html>th</code> and <code data-anolis-spec=html>body</code>. @@ -1832,7 +1832,7 @@ <p>HTML5 does not use the terms "block-level" or "inline" as part of its content model rules, to reduce confusion with CSS. However, it has more - <span data-anolis-spec=html title=concept-categories>categories</span> than + <span data-anolis-spec=html title="content categories">categories</span> than HTML4, and an element can be part of none of them, one of them, or several of them. <ul> @@ -1929,7 +1929,12 @@ requires a <code data-anolis-spec=html>legend</code> child. - <h2 id="apis">New APIs</h2> + <h2 id="apis">APIs</h2> + + <p>HTML5 has introduced many new APIs and have extended or changed existing APIs. + + + <h3 id="new-apis">New APIs</h3> <p>HTML5 introduces a number of APIs that help in creating Web applications. These can be used together with the new elements introduced @@ -1998,11 +2003,6 @@ title=dom-external-addsearchprovider>AddSearchProvider()</code> and <code data-anolis-spec=html title=dom-external-issearchproviderinstalled>IsSearchProviderInstalled()</code>). - - <li>An API for simulating clicks and handling focus (<code - data-anolis-spec=html title=dom-click>click()</code>, <code - data-anolis-spec=html title=dom-focus>focus()</code>, <code - data-anolis-spec=html title=dom-blur>blur()</code>). </ul> @@ -2032,6 +2032,37 @@ <li>An API for server-to-client data push (<code data-anolis-spec=html>EventSource</code>). </ul> + + + <h3 id="changed-apis">Changed APIs</h3> + + <p>The following features from DOM Level 2 HTML are changed in various ways: + + <ul> + <li><p><code data-anolis-spec=html title=dom-document-title>document.title</code> now collapses whitespace on getting. + + <li><p><code data-anolis-spec=html title=dom-document-domain>document.domain</code> is made settable, which can change the document's effective script origin. + + <li><p><code data-anolis-spec=html title=dom-document-open>document.open()</code> now either clears the document (if invoked with two or less arguments), or acts like <code data-anolis-spec=html title=dom-open>window.open()</code> (if invoked with three or four arguments). In the former case, throws an exception in XML. + + <li><p><code data-anolis-spec=html title=dom-document-close>document.close()</code>, <code data-anolis-spec=html title=dom-document-close>document.write()</code> and <code data-anolis-spec=html title=dom-document-close>document.writeln()</code> throw an exception in XML. The latter two now support variadic arguments; they can add text to the document's input stream while it is still being parsed, or can imply a call to <code data-anolis-spec=html title=dom-document-open>document.open()</code> or be ignored altogether in some cases. + + <li><p><code data-anolis-spec=html title=dom-document-getElementsByName>document.getElementsByName()</code> now returns all HTML elements with a <code>name</code> attribute matching the argument. + + <li><p><code data-anolis-spec=html title=dom-form-elements>elements</code> on <code data-anolis-spec=html>HTMLFormElement</code> now returns an <code>HTMLFormControlsCollection</code> of <code data-anolis-spec=html>button</code>, <code data-anolis-spec=html>fieldset</code>, <code data-anolis-spec=html>input</code>, <code data-anolis-spec=html>keygen</code>, <code data-anolis-spec=html>object</code>, <code data-anolis-spec=html>output</code>, <code data-anolis-spec=html>select</code> and <code data-anolis-spec=html>textarea</code> elements. <code data-anolis-spec=html title=dom-form-length>length</code> returns the number of nodes in <code data-anolis-spec=html title=dom-form-elements>elements</code>. + + <li><p><code data-anolis-spec=html title=dom-select-add>add()</code> on <code data-anolis-spec=html>HTMLSelectElement</code> now also accepts an integer as its second argument. + + <li><p><code data-anolis-spec=html title=dom-select-remove>remove()</code> on <code data-anolis-spec=html>HTMLSelectElement</code> now removes the first element in the collection if the argument is out of bounds. + + <li><p><code data-anolis-spec=html>a</code> and <code data-anolis-spec=html>area</code> elements now stringify to their <code data-anolis-spec=html title=attr-hyperlink-href>href</code> attribute. + + <li><p>The <code + data-anolis-spec=html title=dom-click>click()</code>, <code + data-anolis-spec=html title=dom-focus>focus()</code> and <code + data-anolis-spec=html title=dom-blur>blur()</code>) methods are now available on all HTML elements. + + </ul> <h3 id="document-extensions">Extensions to <code>Document</code></h3> @@ -2086,7 +2117,7 @@ editing API. <li><p>All event handler IDL attributes. Also, <code data-anolis-spec=html - title=dom-document-onreadystatechange>onreadystatechange</code> is a + title=handler-onreadystatechange>onreadystatechange</code> is a special event handler IDL attribute that is only only available on <code data-anolis-spec=html>Document</code>. </ul> @@ -2117,7 +2148,7 @@ element's classes. The <code data-anolis-spec=html>a</code>, <code data-anolis-spec=html>area</code> and <code data-anolis-spec=html>link</code> elements have a similar attribute called - <code data-anolis-spec=html title=dom-ilnk-rellist>relList</code> that + <code data-anolis-spec=html title=dom-link-rellist>relList</code> that provides the same functionality for the <code data-anolis-spec=html title=attr-link-rel>rel</code> attribute. @@ -2153,16 +2184,58 @@ element is editable. <li><p><code data-anolis-spec=html - title=dom-commandType>commandType</code>, <code data-anolis-spec=html - title=dom-commandLabel>commandLabel</code>, <code data-anolis-spec=html - title=dom-commandIcon>commandIcon</code>, <code data-anolis-spec=html - title=dom-commandHidden>commandHidden</code>, <code data-anolis-spec=html - title=dom-commandDisabled>commandDisabled</code> and <code - data-anolis-spec=html title=dom-commandChecked>commandChecked</code> is + title=dom-command-ro-commandType>commandType</code>, <code data-anolis-spec=html + title=dom-command-ro-commandLabel>commandLabel</code>, <code data-anolis-spec=html + title=dom-command-ro-commandIcon>commandIcon</code>, <code data-anolis-spec=html + title=dom-command-ro-commandHidden>commandHidden</code>, <code data-anolis-spec=html + title=dom-command-ro-commandDisabled>commandDisabled</code> and <code + data-anolis-spec=html title=dom-command-ro-commandChecked>commandChecked</code> is part of the command API. <li><p>All event handler IDL attributes. </ul> + + + <h3 id="other-extensions">Extensions to Other Interfaces</h3> + + <p>Some interfaces in DOM Level 2 HTML have been extended.</p> + + <ul> + <li><p><code data-anolis-spec=html>HTMLOptionsCollection</code> now has a legacy caller, setter creator, and the members <code data-anolis-spec=html title=dom-HTMLOptionsCollection-add>add()</code>, <code data-anolis-spec=html title=dom-HTMLOptionsCollection-remove>remove()</code> and <code data-anolis-spec=html title=dom-HTMLOptionsCollection-selectedIndex>selectedIndex</code> + + <li><p><code data-anolis-spec=html>HTMLLinkElement</code> and <code data-anolis-spec=html>HTMLStyleElement</code> now implement the <code>LinkStyle</code> interface from CSSOM. <span data-anolis-ref>CSSOM</span> + + <li><p><code data-anolis-spec=html>HTMLFormElement</code> now has a named getter and an indexed getter. + + <li><p><code data-anolis-spec=html>HTMLSelectElement</code> now has a getter, <code data-anolis-spec=html title=dom-select-item>item()</code> and <code data-anolis-spec=html title=dom-select-namedItem>namedItem()</code> methods, a setter creator, <code data-anolis-spec=html title=dom-select-selectedOptions>selectedOptions</code> and <code data-anolis-spec=html title=dom-lfe-labels>labels</code> IDL attributes, and members for the form constrain validation API: <code data-anolis-spec=html title=dom-cva-willvalidate>willValidate</code>, <code data-anolis-spec=html title=dom-cva-validity>validity</code>, <code data-anolis-spec=html title=dom-cva-validationMessage>validationMessage</code>, <code data-anolis-spec=html title=dom-cva-checkValidity>checkValidity()</code> and <code data-anolis-spec=html title=dom-cva-setCustomValidity>setCustomValidity()</code>. + + <li><p><code data-anolis-spec=html>HTMLOptionElement</code> now has a constructor <code data-anolis-spec=html title=dom-option>Option</code>. + + <li><p><code data-anolis-spec=html>HTMLInputElement</code> now has the members <code data-anolis-spec=html title=dom-input-files>files</code>, <code data-anolis-spec=html title=dom-input-height>height</code>, <code data-anolis-spec=html title=dom-input-indeterminate>indeterminate</code>, <code data-anolis-spec=html title=dom-input-list>list</code>, <code data-anolis-spec=html title=dom-input-valueAsDate>valueAsDate</code>, <code data-anolis-spec=html title=dom-input-valueAsNumber>valueAsNumber</code>, <code data-anolis-spec=html title=dom-input-width>width</code>, <code data-anolis-spec=html title=dom-input-stepUp>stepUp()</code>, <code data-anolis-spec=html title=dom-input-stepDown>stepDown()</code>, the form constraint validation API members, <code data-anolis-spec=html title=dom-lfe-labels>labels</code>, members for the text field selection API: <code data-anolis-spec=html title="dom-textarea/input-selectionStart">selectionStart</code>, <code data-anolis-spec=html title="dom-textarea/input-selectinEnd">selectionEnd</code>, <code data-anolis-spec=html title="dom-textarea/input-selectionDirection">selectionDirection</code> and <code data-anolis-spec=html title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>. + + <li><p><code data-anolis-spec=html>HTMLTextAreaElement</code> now has the members <code data-anolis-spec=html title=dom-textarea-textLength>textLength</code>, the form constraint validation API members, <code data-anolis-spec=html title=dom-lfe-labels>labels</code> and the text field selection API members. + + <li><p><code data-anolis-spec=html>HTMLButtonElement</code> now has the form constraint validation API members and <code data-anolis-spec=html title=dom-lfe-labels>labels</code>. + + <li><p><code data-anolis-spec=html>HTMLLabelElement</code> now has the member <code data-anolis-spec=html title=dom-label-control>control</code>. + + <li><p><code data-anolis-spec=html>HTMLFieldSetElement</code> now has the members <code data-anolis-spec=html title=dom-fieldset-type>type</code>, <code data-anolis-spec=html title=dom-fieldset-elements>elements</code> and the form constraint validation API members. + + <li><p><code data-anolis-spec=html>HTMLAnchorElement</code> now has the members <code data-anolis-spec=html title=dom-a-relList>relList</code>, <code data-anolis-spec=html title=dom-a-text>text</code>, the URL decomposition IDL attributes: <code data-anolis-spec=html title=dom-a-protocol>protocol</code>, <code data-anolis-spec=html title=dom-a-host>host</code>, <code data-anolis-spec=html title=dom-a-hostname>hostname</code>, <code data-anolis-spec=html title=dom-a-port>port</code>, <code data-anolis-spec=html title=dom-a-pathname>pathname</code>, <code data-anolis-spec=html title=dom-a-search>search</code> and <code data-anolis-spec=html title=dom-a-hash>hash</code>. + + <li><p><code data-anolis-spec=html>HTMLImageElement</code> now has a constructor <code data-anolis-spec=html title=dom-Image>Image</code>, the members <code data-anolis-spec=html title=dom-img-naturalWidth>naturalWidth</code>, <code data-anolis-spec=html title=dom-img-naturalHeight>naturalHeight</code> and <code data-anolis-spec=html title=dom-img-complete>complete</code>. <code data-anolis-spec=html>HTMLAreaElement</code> also has the same new members. + + <li><p><code data-anolis-spec=html>HTMLObjectElement</code> now has the members <code data-anolis-spec=html title=dom-object-contentWindow>contentWindow</code>, the form constraint validation API members and a legacy caller. + + <li><p><code data-anolis-spec=html>HTMLMapElement</code> now has the member <code data-anolis-spec=html title=dom-map-images>images</code>. + + <li><p><code data-anolis-spec=html>HTMLTableElement</code> now has the member <code data-anolis-spec=html title=dom-table-createTBody>createTBody()</code>. + + <li><p><code data-anolis-spec=html>HTMLIFrameElement</code> now has the member <code data-anolis-spec=html title=dom-iframe-contentWindow>contentWindow</code>. + + </ul> + + <p>In addition, most new content attributes also have corresponding IDL attributes on the elements' interfaces, for instance the <code data-anolis-spec=html title=dom-link-sizes>sizes</code> IDL attribute on <code data-anolis-spec=html>HTMLLinkElement</code> which reflects the <code data-anolis-spec=html title=attr-link-sizes>sizes</code> content attribute. <h2 id="changelog">HTML5 Changelogs</h2> @@ -2198,7 +2271,7 @@ <li>The <code>window.opener</code> IDL attribute can now return null in some cases. <li>The <code>clearTimeout()</code> and <code>clearInterval()</code> methods were made synonymous. <li>The CSS <code>@global</code> at-rule was introduced, for use together with <code>style</code> elements with the <code>scoped</code> attribute. - <li>The <code>embed</code> and <code>object</code> elements now have a legacycaller. + <li>The <code>embed</code> and <code>object</code> elements now have a legacy caller. <li>The handling of <code>window.onerror</code>'s return value was changed to match reality. <li>The <code>setTimeout()</code> API is now allowed to be throttled in background tabs. <li>The <code>:valid</code> and <code>:invalid</code> pseudo-classes now apply to <code>form</code> elements. @@ -2215,7 +2288,7 @@ <li>The <code>q</code> element now has language-specific quotes rendered by default. <li>The <code>data</code> element was introduced. <li>The <code>time</code> element was redesigned to make it match how people wanted to use it. Its <code>pubdate</code> attribute was dropped. - <li>The legacycaller on <code>form</code> was removed. + <li>The legacy caller on <code>form</code> was removed. <li>The <code>location.resolveURL()</code> method was removed. <li>The <code>track</code> element now sniffs instead of obeying the MIME type. <li>The <code>load()</code> method on documents created by <code>createDocument()</code> is now defined on the <code>XMLDocument</code> interface.
Received on Tuesday, 6 March 2012 11:42:52 UTC