On Wed, Feb 12, 2014 at 3:55 PM, Benjamin Smedberg <[email protected]>wrote:
> The root of this problem is that on the "browser web" you just open a new
> window using target="_blank" or window.open("_blank"). For apps this could
> either mean "open another window of my app" or "open another window in the
> default browser".
>
I think the current behaviour in Firefox OS is that target=_blank should
open a browser window, window.open should open up to one additional
overlayed app window (useful for authentication use cases for example).
When we implement the full "sheets" model after 1.4 we will probably allow
apps to have multiple windows.
> Are there other cases which are unclear? Do you mean for this to apply to
> normal navigation using links which wouldn't open a new window in a normal
> browser?
>
Yes, I'm saying clicking on a normal hyperlink (without target=_blank
specified) inside an app with an href outside the origin of the app should
open outside of the app frame. If the scope of the app is defined by the
origin then it isn't part of the app. Additionally, I'm suggesting
navigating to a URL that corresponds to the origin of an installed app from
inside a browser window should open the URL in the app.
There's another use case of clicking history results in the Rocketbar (like
awesomebar results). URLs from installed app origins should open in apps,
all other URLs should open in system browser windows.
> For the web inside of apps, I strongly feel we should do two things:
>
> * it should be possible for the app either kind (a new app window or a
> browser window) of window for any URL. So something like <a rel="external"
> target="_blank"> would open a browser window while <a rel="internal"
> target="_blank" would open a new app window. For window.open we might be
> able to use the window features to achieve the same thing
>
> window.open(url, "_blank", "external")
> window.open(url, "_blank", "internal");
>
There have been discussions about something similar for "sheets" after 1.4
but I don't think this is necessary yet, if ever.
> The rest of the question comes down to what to do by default when there is
> a target="_blank" with no internal/external marker.
I suggest always open a browser window, as we do today.
> And perhaps what to do when there is a normal hyperlink which links to an
> "external" domain. I don't have much opinion there other than whatever
> seems to work best with existing content.
>
I suggest opening a browser window, unless the URL corresponds to the
origin of another app, in which case it should open in the app.
Ben
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps