Giter Club home page Giter Club logo

Comments (1)

khushalsagar avatar khushalsagar commented on May 24, 2024

We discussed this internally today and decided to abandon this in favour of the pageconceal idea on #9702. The summary is as follows:

  • The use-cases on #9702 will still remain since fundamentally navigate is at the beginning of the navigation lifecycle and pageconceal will be at the end (right before commit). Both the opt-in and customization can depend on information known at commit time.

  • A pro of letting authors provide the opt-in via navigate, instead of pageconceal, is performance. The API contract for pageconceal will be as follows:

    • If there is a ViewTransition, it blocks the new Document from painting (pagereveal must fire after pageconceal). So pageconceal delays the navigation from committing.

    • If there is no ViewTransition, then committing the new Document can be done in parallel with hiding/unloading of the old Document.

    This means knowing whether there is a VT opt-in in navigate avoids making pageconceal blocking. But having the opt-in on navigate makes another planned extension for the CSS opt-in complicated:

    @view-transition {
      navigation: auto;
      to: urlpattern(...);
    }

    We'd like the to value here to apply to the final URL (after all redirects). If the author's CSS has an opt-in for a to value and script does an opt-out in navigate, which one wins? And if the author does an opt-in via navigate but the CSS has an opt-out, does that still apply?

    We considered making to here correspond to the initial URL (instead of final URL), authors could handle the final URL scenarios in script. But it came up that same-origin redirects is a common enough use-case (for example with form submission or redirecting to the login screen) that keeping them declarative is nicer.

Closing this issue to continue the discussion on #9702. Please re-open if I incorrectly assumed anything.

from html.

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.