[whatwg] HTML resource packages

Philip Taylor excors+whatwg at gmail.com
Wed Aug 4 13:32:27 PDT 2010

On Wed, Aug 4, 2010 at 9:01 PM, Justin Lebar <justin.lebar at gmail.com> wrote:
>> What happens if the document contains multiple <html> elements (not
>> all the root element)? (e.g. if it's XHTML, or the elements are added
>> by scripts). The packages spec seems to assume there is only ever one.
> The packages attribute should work like the manifest attribute currently works.
> I don't see language in the cache manifest section of HTML5 (6.6) specifying
> what happens when there are multiple <html> elements, so I hope I don't need to
> specify this either.  :)

http://whatwg.org/html#attr-html-manifest says:

  "The manifest attribute only has an effect during the early stages
of document load. Changing the attribute dynamically thus has no
effect (and thus, no DOM API is provided for this attribute)."

Its effect is triggered from http://whatwg.org/html#parser-appcache
("html" token in the "before html" insertion mode) or from
http://whatwg.org/html#read-xml , so it will only ever run for the
root <html> element of the document.

The packages attribute is defined as running "Whenever the packages
attribute is changed (including when the document is first loaded, if
its <html> element has a packages attribute)", so it's not the same.
If you do want it to work the same then you'll need to hook into the
parser and ignore dynamic updates.

Philip Taylor
excors at gmail.com

More information about the whatwg mailing list