Comments (6)
I agree that queuing would be more ergonomic that plain failing.
In the case of HTML elements in particular, it seems uncontroversial to delay firing the request until activation.
However, for JS triggered requests (e.g. fetch API), it seems preferable to have them fail. The code should be written to deal with failures. Otherwise, we might block a lot of work on delayed requests?
@nyaxt: any concerns with these behaviors?
from portals.
I think suspending prohibited network fetches and resuming them on activation could work in Blink. I think we just need to experiment.
from portals.
I think JS triggered requests could also benefit form delay for the same reason, though the cost of handling errors is obviously much smaller when you're already writing JS. I still think it could help avoid developers needing to think a lot about lifecycle states. Though I suppose it's debatable whether that is a goal.
Similarly, I was going to ask the same question about access to local state. If JS triggered requests should produce errors, then it seems like JS triggered access to local state would also produce errors. I'll file a separate issue for this.
from portals.
Submitted #10
from portals.
One thing I'd like to note: network access to the same domain from which a document has been loaded should be safe. Not sure if we want to make that exception. This would, of course, include a family of such domains defined by either eTLD+1 or maybe a viewer could define a set of safe domains when constructing a portal.
from portals.
Note that this issue more properly would belong on whatever feature/document policy repository is planning to spec the network access feature/document policy. We can leave it here for now, but I'm noting that for triage purposes.
from portals.
Related Issues (20)
- Investigate "things that happen on load" and whether they should happen on activation
- Should we fire unload handlers on portaled pages when the host page unloads? HOT 1
- Finalize CSP fetch directive design
- Styling hooks while portaled HOT 3
- interactions with window.close HOT 2
- Handling bad URLs, navigation errors, downloads, and 204s in a unified way HOT 4
- What should closed portals display? HOT 5
- Should you be able to tell if a portal is currently closed, without calling activate()? HOT 3
- Handling of focus inside a portal HOT 6
- Is there a polyfill for this?
- Custom protocol support HOT 1
- Broken links to web-platform-tests.live HOT 1
- Cross-origin portals could be awesome with gTLDs HOT 1
- [Feature Request] Update portal-embed-demo to work using the latest <portal> spec
- Use Case: Live Reload with loading error handling in development
- Update published spec
- Allow portal elements to be re-used across navigations on same-origin sites. HOT 2
- Is this proposal abandoned? HOT 2
- Portal's behavior when it is embedded in a prerender context HOT 1
- Broken references in Portals
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portals.