Intent to Implement and Ship: history.index

62 views
Skip to first unread message

Domenic Denicola

unread,
Aug 23, 2017, 1:16:03 AM8/23/17
to blin...@chromium.org

Contact emails

dom...@chromium.org (spec), pani...@chromium.org, jap...@chromium.org (implementation)


Spec

https://html.spec.whatwg.org/multipage/history.html#dom-history-index-2

(but, https://html.spec.whatwg.org/multipage/history.html#dom-history-index once we fix a spec tooling bug)


TAG Review: skipped as this is a very minor and natural addition.


Summary

Adds history.index, a counterpart to history.length, giving the index of the current entry in the joint session history.


Motivation

This allows web content to more simply track its location within the history, especially relative to previous states, by just comparing indices.


More motivation can be found in the AMP team's description of the problem and current workarounds in the spec issue.


Interoperability and Compatibility Risk


This feature should be simple to implement interoperably; it is a natural exposure of data that already exists in all browsers. As such, we hope to see it implemented everywhere.


Edge: No signals (bug)

Firefox: No signals (bug)

Safari: Public support (bug)

Web developers: Positive


Ongoing technical constraints

None


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Is this feature fully tested by web-platform-tests?

Yes: see the test additions at https://chromium-review.googlesource.com/c/chromium/src/+/596716.


OWP launch tracking bug

crbug.com/758068


Entry on the feature dashboard

https://www.chromestatus.com/feature/5733738818306048


Requesting approval to ship?

Yes


TAMURA, Kent

unread,
Aug 23, 2017, 4:03:45 AM8/23/17
to Domenic Denicola, blin...@chromium.org
LGTM1. Looks a simple extension of an existing feature.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM0wra-oUzodqiTwn6FqDWiTbQOq6wCT5YAH%2BUQARfGoNzp2Bg%40mail.gmail.com.



--
TAMURA Kent
Software Engineer, Google


Jochen Eisinger

unread,
Aug 23, 2017, 9:59:14 AM8/23/17
to TAMURA, Kent, Domenic Denicola, blin...@chromium.org

Dimitri Glazkov

unread,
Aug 23, 2017, 10:47:12 AM8/23/17
to Jochen Eisinger, TAMURA, Kent, Domenic Denicola, blin...@chromium.org

Boris Zbarsky

unread,
Aug 30, 2017, 12:46:03 PM8/30/17
to Domenic Denicola, blin...@chromium.org
On 8/23/17 1:15 AM, Domenic Denicola wrote:
> Firefox: No signals (bug
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1392897>)

Reading that bug, the Firefox signal is negative, though that postdates
the intent being sent.

In particular, per that bug indices are not stable at least in the
Firefox implementation; as document with subframes are discarded and
their subframes session histories are removed from the joint session
history, the indexing changes.

The spec around this stuff seems pretty broken to me, for what it's
worth. In particular, it doesn't make it clear whether indices are
stable or not, and is broken either way. If they're unstable, then
.index is impossible to use sanely, as pointed out in the Firefox bug.
If they're stable, then history.back() as specified doesn't actually
work, and neither do all sorts of other things; history.back() was just
the simplest one to construct an example for. I filed
https://github.com/whatwg/html/issues/2985 describing a simple version
of this problem.

Speaking for Mozilla, I don't think .index should be shipped until there
is some indication that it can actually be used sanely somehow. At the
moment, it's not obvious to me how one would do that.

-Boris

Philip Jägenstedt

unread,
Sep 4, 2017, 11:08:07 AM9/4/17
to Boris Zbarsky, Domenic Denicola, blin...@chromium.org
Domenic, I take it you consider this blocked on https://github.com/whatwg/html/issues/2985 now? Can you check back here when you think it's resolved?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
Reply all
Reply to author
Forward
0 new messages