Giter Club home page Giter Club logo

Comments (3)

domenic avatar domenic commented on September 1, 2024

My instinct here is that the test and Chromium's implementation is wrong, and we should update them. I cannot find any evidence of this being intentional.

from html.

rwlbuis avatar rwlbuis commented on September 1, 2024

My instinct here is that the test and Chromium's implementation is wrong, and we should update them. I cannot find any evidence of this being intentional.

That plan would align well with WebKit's current implementation.

from html.

domenic avatar domenic commented on September 1, 2024

I started working on this and then I had second thoughts. I think this might have been intentional after all.

The original explainer states:

hashChange: a boolean, indicating whether or not this is a same-document fragment navigation.

Additionally, a large amount of example code does stuff like

navigation.addEventListener("navigate", e => {
  if (e.hashChange) {
    // Assume this is the user clicking on a fragment link and ignore it.
    return;
  }

  // Otherwise, process this with navigation interception.
});

I think changing how such code reacts to history.pushState("/#fragment") might cause compat problems. Worse, I think it might make it harder for people to write nice apps that use the navigation API.

So now I am thinking we should update the spec to match Chromium's behavior and the tests... I am open to being persuaded otherwise, especially by web developers with experience using the navigation API. But I'll tentatively proceed with a spec patch.

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.