W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] Fw: Feature Request: Media Elements as Targets for Links

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Tue, 27 Nov 2012 19:28:54 +1100
Message-ID: <CAHp8n2k2U4z5mCY0_Dbr7Fpf9gfAQK-UumABRL+AQT0Q25yMKA@mail.gmail.com>
To: Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net>
Cc: whatwg <whatwg@lists.whatwg.org>
On Tue, Nov 27, 2012 at 11:10 AM, Nils Dagsson Moskopp <
nils@dieweltistgarnichtso.net> wrote:

>
> Maybe I am misunderstanding you here, but I think the fragment
> identifier abuse by JavaScript authors can be of use here  it would
> allow for a simple polyfill that could quickly propagate use and
> knowledge of such a feature before someone else invents yet another
> slightly incompatible way of doing the same thing.
>

Nobody will stop you from writing a JS library to interpret the pattern of <
http://example.org/podcast.html#episode1&t=01:23> in the way that you
expect it to be interpreted. However, IIUC, browsers will interpret this as
an offset to an element on the html page that has an id of
id="episode1&t=01:23". If such an element happens to exist, the page will
scroll to it. You can additionally run the JS, but that won't stop the page
from getting scrolled.

Fortunately, it's not very likely that HTML pages have an element with such
an @id value, so a polyfill as you describe could indeed be very useful.

Regards,
Silvia.
Received on Tuesday, 27 November 2012 08:40:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT