Code Monkey home page Code Monkey logo

Comments (6)

KenjiBaheux avatar KenjiBaheux commented on September 28, 2024

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.

nyaxt avatar nyaxt commented on September 28, 2024

I think suspending prohibited network fetches and resuming them on activation could work in Blink. I think we just need to experiment.

from portals.

ericfs avatar ericfs commented on September 28, 2024

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.

ericfs avatar ericfs commented on September 28, 2024

Submitted #10

from portals.

dvoytenko avatar dvoytenko commented on September 28, 2024

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.

domenic avatar domenic commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.