0

Communication between Sketchup and their webdialogs is done by using window.location = skp:action@value to trigger a callback on the Sketchup. While doing so, it doesn't load another page, which this question uses.

Is there a way to extend window.location to log changes to the console when it doesn't load a new page?

Community
  • 1
  • 1
Sven
  • 2,839
  • 7
  • 33
  • 53

1 Answers1

1

you can try the hashchange event that fires when a window's hash changes

https://developer.mozilla.org/en/docs/Web/API/WindowEventHandlers/onhashchange

window
  .addEventListener("hashchange", function(event){
    console.log(event.newURL); //document.URL
  }, false);
Seth
  • 10,198
  • 10
  • 45
  • 68
bfmags
  • 2,885
  • 2
  • 17
  • 28