Nebula icon indicating copy to clipboard operation
Nebula copied to clipboard

Update History API to the Navigation API (🟥 awaiting support)

Open chrisblakley opened this issue 2 years ago • 3 comments

...when it is available.

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

chrisblakley avatar May 14 '22 04:05 chrisblakley

https://caniuse.com/mdn-api_navigation

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

chrisblakley avatar Jun 08 '22 01:06 chrisblakley

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 avatar Jun 10 '22 03:06 chrisblakley

Awaiting both Firefox and Safari as of July 2023.

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

chrisblakley avatar Jul 24 '23 21:07 chrisblakley