W3C home > Mailing lists > Public > public-html@w3.org > April 2015

Re: Relative links in seamless iframes

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Tue, 7 Apr 2015 06:31:35 +0000
To: Andrea Rendine <master.skywalker.88@gmail.com>, "public-html@w3.org LIST" <public-html@w3.org>
Message-ID: <1428388292381.53151@microsoft.com>
This is an interesting proposal, but I think that making baseURI's seamless as well starts to go beyond the scope of what seamless should make possible. As far as I can imagine a variety of document-centric behaviors should still be preserved, including:

* event bubbling (constrained)

* selection/focus management (constrained)

* form submission and form pointers (constrained)

etc.


If we allow some DOM behaviors for base URI that it opens up the larger question of where do we draw the line with others?


And for a workaround, can't you just find the parent document's base URI and add a new base URI tag to the child document to get the same base URI?

________________________________

From: Andrea Rendine <master.skywalker.88@gmail.com>
Sent: Sunday, April 5, 2015 12:47 PM
To: public-html@w3.org LIST
Subject: Relative links in seamless iframes

Looking at the spec, it is clear that iframes in seamless mode must act, if possible, as part of the document containing their nested browsing context.
One thing is missing, though. The base URL to resolve relative URL in links of nested browsing contexts, as well as embedded resources throughout the nested browsing context's document, is obtained in relation with nested document.
Wouldn't it be possible to set base URL for nested document using container document's base URL? It should be possible at least in case the container has a frozen base URL and the nested document hasn't.

I was writing a JS snippet capable of using pushState along with a query string for keeping track of iframe navigation. This script appends a query parameter in the form of "iframe_name=iframe_document_relativeURI" to the address of the page, so that the URI can keep track of the current page state. This is primarily for link sharing, but anyway the src attribute is updated server-side for possible reuses (e.g. sitewide link mapping). The problem is, nested page sets the querystring using relative URL of the link for site navigation, and relative URLs rely upon nested document's base URL. If for any reason container and nested documents' bases do not coincide (e.g. the nested document is specified by a file in a different directory), URL retrieval is not possible (of course I currently solve the problem using a consistent sitewide <base> element so that all relative URIs are resolved according to the same base).

Are there any technical issues in doing that? Also consider that there would be no backward compatibility issue, as no browser currently implements @seamless.
Received on Tuesday, 7 April 2015 06:32:05 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:43 UTC