title: Run Angular 12 inside JavaFX - NavigationError
body: <p>We're trying to run our Angular 12 page in a external application with a JavaFx Webview.</p>
  <p>The initial html, js successfully loads and navigates to the login page, but it seems that manual navigation by the router (for example after logging in) doesn't work.</p>
  <p>The logs of javafx show the following issues:</p>
  <pre><code>TRACE - processing ShowWebPageAction {&quot;type&quot;:&quot;showWebPageAction&quot;,&quot;displayUrl&quot;:&quot;http://localhost:4200/login&quot;,&quot;displayUrlPost&quot;:false}
  DEBUG - Console: [http://localhost:4200/main.js:63572] Environment Service is ready
  DEBUG - Console: [http://localhost:4200/main.js:63574] Populated Nutzer Cache
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: NavigationStart
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] NavigationStart(id: 1, url: '/login')
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] NavigationStart(id: 1, url: '/login')
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: RoutesRecognized
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] RoutesRecognized(id: 1, url: '/login', urlAfterRedirects: '/login', state: Route(url:'', path:'') { Route(url:'login', path:'login') } )
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] RoutesRecognized(id: 1, url: '/login', urlAfterRedirects: '/login', state: Route(url:'', path:'') { Route(url:'login', path:'login') } )
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: GuardsCheckStart
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] GuardsCheckStart(id: 1, url: '/login', urlAfterRedirects: '/login', state: Route(url:'', path:'') { Route(url:'login', path:'login') } )
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] GuardsCheckStart(id: 1, url: '/login', urlAfterRedirects: '/login', state: Route(url:'', path:'') { Route(url:'login', path:'login') } )
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: ChildActivationStart
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] ChildActivationStart(path: '')
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] ChildActivationStart(path: '')
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: ActivationStart
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] ActivationStart(path: 'login')
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] ActivationStart(path: 'login')
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: NavigationCancel
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] NavigationCancel(id: 1, url: '/login')
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] NavigationCancel(id: 1, url: '/login')
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: NavigationStart
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] NavigationStart(id: 2, url: '/bestellwesen')
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] NavigationStart(id: 2, url: '/bestellwesen')
  DEBUG - Console: [http://localhost:4200/vendor.js:118552] Router Event: RouteConfigLoadStart
  DEBUG - Console: [http://localhost:4200/vendor.js:118553] RouteConfigLoadStart(path: bestellwesen)
  DEBUG - Console: [http://localhost:4200/vendor.js:118554] RouteConfigLoadStart(path: bestellwesen)
  ERROR - Console: [http://localhost:4200/vendor.js:118552] Router Event: NavigationError
  ERROR - Console: [http://localhost:4200/vendor.js:118553] NavigationError(id: 2, url: '/bestellwesen', error: TypeError: The Document.onerror getter can only be used on instances of Document)
  ERROR - Console: [http://localhost:4200/vendor.js:118554] NavigationError(id: 2, url: '/bestellwesen', error: TypeError: The Document.onerror getter can only be used on instances of Document)
  ERROR - Console: [http://localhost:4200/vendor.js:38272] ERROR
  DEBUG - Console: [http://localhost:4200/vendor.js:59832] Angular is running in development mode. Call enableProdMode() to enable production mode.
  DEBUG - Console: [http://localhost:4200/polyfills.js:9513] [WDS] Live Reloading enabled.
  </code></pre>
  <p>Could the JavaFX Webengine somehow tamper with the <code>Document.onerror getter</code>?</p>
  <p>How can we get the navigation to work properly?</p>