chrisblakley / Nebula

Nebula is a WordPress theme framework that focuses on enhancing development. The core features of Nebula make it a powerful tool for designing, developing, and analyzing WordPress websites consistently, yet its deliberately uncomplicated code syntax also serves as a learning resource for programmers themselves.
https://nebula.gearside.com
GNU General Public License v3.0
144 stars 36 forks source link

Update History API to the Navigation API [🟥 awaiting support] #2204

Open chrisblakley opened 2 years ago

chrisblakley commented 2 years ago

...when it is available.

Screen Shot 2022-05-14 at 12 13 22 AM

chrisblakley commented 2 years ago

https://caniuse.com/mdn-api_navigation

Screen Shot 2022-06-07 at 9 52 36 PM

chrisblakley commented 2 years ago

Another example:

navigation.addEventListener('navigate', (navigateEvent) => {
  switch (navigateEvent.destination.url) {
    case 'https://example.com/':
      navigateEvent.transitionWhile(loadIndexPage());
      break;
    case 'https://example.com/cats':
      navigateEvent.transitionWhile(loadCatsPage());
      break;
  }
});

https://developer.chrome.com/docs/web-platform/navigation-api/

chrisblakley commented 1 year ago

Awaiting both Firefox and Safari as of July 2023.

Screen Shot 2023-07-24 at 5 25 45 PM