4 ms·
This has already been shipped in Chrome (and Chrome only) for some time. Given Google is behind this, I have to wonder what their intent is with portal as I cou
by tannhaeuser 6y ago
This has already been shipped in Chrome (and Chrome only) for some time. Given Google is behind this, I have to wonder what their intent is with portal as I could see it end up in the next big round of attention and click hijacking a la AMP (think rich previews in Google Search giving visitors even less of a reason to go to your site).
In principle I'm all for adding new declarative UI elements to HTML the markup language but forgive me my lack of enthusiasm after years of failed attempts by Firefox devs into this direction that were never implemented in Chrome. And I can't see the point in HTML elements when you need JavaScript to make use of them anyway (same issue with HTML components).
- wizzwizz4 6y ago> This has already been shipped in Chrome (and Chrome only) for some time. It's possible that this is a major selling point of the Portal element.
- madeofpalk 6y agoThey want AMP to be better - they trying to standardise the Google Search AMP experience into the spec and browsers so it’s better.
- stingraycharles 6y agoThe fundamental idea of AMP is simply not something I can get behind, unless it doesn’t involve hosting the webpages elsewhere (i.e. no more amp.google.com). From the looks of it, though, it seems like they don’t necessarily want AMP to be better, they just want AMP to be more popular. That way they can always point at more broader use cases and don’t look as evil. I realize this is a fairly cynical comment, but I don’t really see reason to be optimistic about all these developments.
- domenicd 6y agoChrome team member here, and one of the people working on the portals spec. This isn't accurate. This feature is being developed behind a flag, as it's still highly experimental and undergoing a lot of change. There is an origin trial [1] for mobile-only same-origin-only portals [2] which people can use to test how well this works in the wild, but it's nowhere near shipping. You can learn more about the intention of the element in [3]. [1]: https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/developer-guide.md https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/d... [2]: https://developers.chrome.com/origintrials/#/view_trial/-7680889164480380927 https://developers.chrome.com/origintrials/#/view_trial/-768... [3]: https://github.com/WICG/portals/blob/master/README.md https://github.com/WICG/portals/blob/master/README.md
- earthboundkid 6y agoCan you give a motivating example for a website that isn’t Google to use portal? I’m not seeing it. Something that I would actually use if it existed is an auto-height sizing iframe. Because that doesn’t exist, I have to hack around it with Pym.js. That would solve an actual need, unlike portal, which afaict only solves the “I want to be Google SER” usecase.
- anoncareer0212 6y agoYour knowledge is correct https://news.ycombinator.com/item?id=23692067 https://news.ycombinator.com/item?id=23692067
- domenicd 6y agohttps://github.com/WICG/portals/blob/master/README.md#use-cases https://github.com/WICG/portals/blob/master/README.md#use-ca... https://github.com/WICG/portals/blob/master/key-scenarios.md https://github.com/WICG/portals/blob/master/key-scenarios.md (although that's a bit out of date and some of the use cases mentioned there might not be possible anymore as we've tightened the restrictions on cross-site communication to prevent tracking)
- ocdtrekkie 6y ago> So we anticipate many of the current cases for iframes, such as ads, being able to be replaced with portals. I love how the reason Google is pushing this spec is buried near the bottom.
- IMTDb 6y agoAnd the very first reason they state is to speed up loading by using hidden portals, and then activating them on demand. When you first stated use case is a hack around what the spec really is supposed to provide, you have an issue. If you want to speed up rendering of links, create a spec designed and optimised to speed up rendering of links. Not something that will clutter the DOM, then need additional CSS rules to hide what your new element is supposed to do altogether. All of that to sort of arrive to your primary use case.
- ocdtrekkie 6y agoPortals was designed/built for AMP according to the official design document in the background section: https://docs.google.com/document/d/1ITizGVUmfFGktOOynHFhx87cnJ__7EXy-4uMpOE0OAg/edit https://docs.google.com/document/d/1ITizGVUmfFGktOOynHFhx87c...