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

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 UTC