¿Está history.replaceState roto para aplicaciones y complementos XUL?

Tengo un objeto de navegador en mi aplicación XUL así:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>

<window title="Students"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        width="800px"
        height="500px">
<groupbox flex="1">
  <caption label="Students"/>
  <browser type="chrome" src="chrome://myapp/content/index.html" flex="1"/>
</groupbox>   
</window>

Y el index.html es:

<!DOCTYPE html>
<html>
  <head>
    <title>Student page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <h1>Something wrong with history.replaceState</h1>
    <script>
      try{
        history.replaceState(null, '', 'chrome://myapp/content/another.html');
      }catch(e){
        //not sure how to log stuff in XUL without creating helper functions
        alert(e);
      }
    </script>
  </body>
</html>

Se abre con un error:

[Excepción ... "El componente devolvió el código de error: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHistory.replaceState]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" ubicación: "JS frame :: chrome: //myapp/content/index.html ::: : línea 11 "datos: no]

Estaba intentando usar Angularjs en el elemento del navegador, pero como confía en history.replaceState, hacer lo que se supone que debe hacer falla en una aplicación XUL.

[actualizar]

cuando se configura el tipo del elemento del navegador como contenido primario, la ubicación.replaceState no produce una excepción.

  <browser type="content-primary"
    src="chrome://myapp/content/index.html" flex="1"/>

[actualizar]

Problema XMLHttpRequest El estado está devolviendo 0 y verificaciones angulares paraif(status... En Firefox, al abrir el archivo desde el disco, aún retornaría el estado 200 pero no en XUL. Esto hace que las plantillas no se carguen.

Cambiando el retorno en isSuccess en fuente angular areturn (200 <= status && status < 300)||status===0; ahora carga la plantilla.

[actualizar]

Al hacer clic en un enlace veo que un enlace como#/students/22 se convierte enunsafe:chrome://myapp/content/index.html#/students/22 terminando en una alerta que me dice que inseguro no es un protocolo registrado, esto no es un problema de XUL. Para agregar el protocolo chrome: // como es de confianza en Angular, he hecho lo siguiente en mi application.js:

angular.module('student', []).
  config(['$routeProvider','$compileProvider', 
    function($routeProvider,$compileProvider) {
      $compileProvider.urlSanitizationWhitelist(/^\s*(chrome|file):/);

Ahora solo abrirá enlaces achrome://path/file ofile://path/file

Respuestas a la pregunta(1)

Su respuesta a la pregunta