Why do we have HTMLHtmlElement.version?

67 views
Skip to first unread message

Philip Jägenstedt

unread,
Dec 3, 2013, 4:26:38 AM12/3/13
to blink-dev
In my war on [TreatNullAs=NullString], I have come across the manifest
attribute on HTMLHtmlElement. It was added in
<http://trac.webkit.org/changeset/66327>, but it wasn't in the HTML
spec at that time, nor is it now:

http://whatwg.org/html#htmlhtmlelement

It's also not implemented in Opera 12.16, Firefox Nightly, or IE11
Release Preview.

It's a little unusual to have a content attribute which isn't
reflected, so would people prefer if the IDL attribute were
standardized, or that Blink adds a UseCounter and tries to remove it?

Philip

Philip Jägenstedt

unread,
Dec 3, 2013, 4:33:28 AM12/3/13
to blink-dev
Oh noes, wrong subject! To be clear, I'm asking about the manifest attribute.

Philip

PhistucK

unread,
Dec 3, 2013, 6:57:04 AM12/3/13
to Philip Jägenstedt, blink-dev
Can you clarify?
What do you mean by "the manifest attribute"
Can you give a usage example (like HTMLHtmlElement.manifest.version)?


PhistucK



Philip

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Dec 3, 2013, 7:03:19 AM12/3/13
to PhistucK, blink-dev
On Tue, Dec 3, 2013 at 12:57 PM, PhistucK <phis...@gmail.com> wrote:
> Can you clarify?
> What do you mean by "the manifest attribute"

I mean the manifest IDL attribute on HTMLHtmlElement, which is not in
the HTML spec but is in Blink's IDL:

interface HTMLHtmlElement : HTMLElement {
[Reflect, TreatNullAs=NullString] attribute DOMString version;
[Reflect, TreatNullAs=NullString, URL, PerWorldBindings,
ActivityLogging=SetterForIsolatedWorlds] attribute DOMString manifest;
};

> Can you give a usage example (like HTMLHtmlElement.manifest.version)?

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2677

WebKit/Blink say
"http://software.hixie.ch/utilities/js/live-dom-viewer/foo", but other
browsers say "undefined", because they don't have the IDL attribute.

Philip

Peter Beverloo

unread,
Dec 3, 2013, 7:04:08 AM12/3/13
to PhistucK, Philip Jägenstedt, blink-dev
The <html manifest> attribute is part of Application Cache:

The HTMLHtmlElement.manifest property indeed doesn't seem to be defined anywhere.  It was added by Darin Adler a few years ago

Since the patch doesn't explicitly mention that it adds the manifest property for the purpose of exposing it to the web, it may have been a left-over?

Peter

Philip Jägenstedt

unread,
Dec 3, 2013, 7:13:01 AM12/3/13
to Peter Beverloo, blink-dev, da...@apple.com, Ian Hickson
On Tue, Dec 3, 2013 at 1:04 PM, Peter Beverloo <pe...@chromium.org> wrote:
> The <html manifest> attribute is part of Application Cache:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline
>
> The HTMLHtmlElement.manifest property indeed doesn't seem to be defined
> anywhere. It was added by Darin Adler a few years ago
> http://src.chromium.org/viewvc/blink?view=revision&revision=66327
>
> Since the patch doesn't explicitly mention that it adds the manifest
> property for the purpose of exposing it to the web, it may have been a
> left-over?

CC Hixie: is it intentionally not in the spec?

CC Darin: was it intentionally added to WebKit despite not being in the spec?

Philip

Anne van Kesteren

unread,
Dec 3, 2013, 8:16:08 AM12/3/13
to Philip Jägenstedt, Peter Beverloo, blink-dev, Darin Adler, Ian Hickson
On Tue, Dec 3, 2013 at 12:13 PM, Philip Jägenstedt <phi...@opera.com> wrote:
> CC Hixie: is it intentionally not in the spec?
>
> CC Darin: was it intentionally added to WebKit despite not being in the spec?

It is intentionally not in the specification because modifying it has
no effect. The content attribute only takes effect during parsing.


--
http://annevankesteren.nl/

Darin Adler

unread,
Dec 3, 2013, 11:44:06 AM12/3/13
to Peter Beverloo, blink-dev, WebKit Development, Philip Jägenstedt, Ian Hickson
On Tue, Dec 3, 2013 at 1:04 PM, Peter Beverloo <pe...@chromium.org> wrote:

> The HTMLHtmlElement.manifest property indeed doesn't seem to be defined anywhere. It was added by Darin Adler a few years ago http://src.chromium.org/viewvc/blink?view=revision&revision=66327

Reading the change log it seems clear that exposing this attribute to the DOM was unintentional. The change log mentions marking the manifest attribute URL, but not creating the manifest attribute. The patch was supposed to correct the reflection of content attributes, not expose additional attributes.

I believe it should be removed.

— Darin

Ian Hickson

unread,
Dec 3, 2013, 1:21:20 PM12/3/13
to Philip Jägenstedt, Peter Beverloo, blink-dev, da...@apple.com
On Tue, 3 Dec 2013, Philip Jägenstedt wrote:
> On Tue, Dec 3, 2013 at 1:04 PM, Peter Beverloo <pe...@chromium.org> wrote:
> > The <html manifest> attribute is part of Application Cache:
> > http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline
> >
> > The HTMLHtmlElement.manifest property indeed doesn't seem to be defined
> > anywhere. It was added by Darin Adler a few years ago
> > http://src.chromium.org/viewvc/blink?view=revision&revision=66327
> >
> > Since the patch doesn't explicitly mention that it adds the manifest
> > property for the purpose of exposing it to the web, it may have been a
> > left-over?
>
> CC Hixie: is it intentionally not in the spec?

To quote the spec: "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)."

--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'

Philip Jägenstedt

unread,
Dec 3, 2013, 3:09:57 PM12/3/13
to Ian Hickson, Peter Beverloo, blink-dev, da...@apple.com
On Tue, Dec 3, 2013 at 7:21 PM, Ian Hickson <i...@hixie.ch> wrote:
> On Tue, 3 Dec 2013, Philip Jägenstedt wrote:
>> On Tue, Dec 3, 2013 at 1:04 PM, Peter Beverloo <pe...@chromium.org> wrote:
>> > The <html manifest> attribute is part of Application Cache:
>> > http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline
>> >
>> > The HTMLHtmlElement.manifest property indeed doesn't seem to be defined
>> > anywhere. It was added by Darin Adler a few years ago
>> > http://src.chromium.org/viewvc/blink?view=revision&revision=66327
>> >
>> > Since the patch doesn't explicitly mention that it adds the manifest
>> > property for the purpose of exposing it to the web, it may have been a
>> > left-over?
>>
>> CC Hixie: is it intentionally not in the spec?
>
> To quote the spec: "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)."

Sorry, I should have found that myself!

I'll add a UseCounter to verify that it can be removed.

Philip

Philip Jägenstedt

unread,
Dec 3, 2013, 3:12:30 PM12/3/13
to Darin Adler, Peter Beverloo, blink-dev, WebKit Development, Ian Hickson
Thanks Darin! I'll try to get it removed from Blink.

Philip
Reply all
Reply to author
Forward
0 new messages