HelloZeroNet / HelloZeroNet/ZeroHello

Monkey-patching browser APIs with ZeroFrame

Abierto
#141 2 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
JavaScript
Estrellas
73
Forks
69
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

ZeroFrame currently monkey-patches AJAX browser APIs to add AJAX key. It would also be good to monkey-patch some other browser APIs, like `localStorage` or `history`, to call ZeroFrame's wrapper actions instead of directly browser APIs. This would make it possible to use some third-party libraries (like JS routers which use History API, maybe some storage helpers) with ZeroNet without any modifications to them (this currently requires to modify them to use ZeroFrame instead of browser APIs).

Some of APIs which should be monkey-patched are:

* `localStorage`: Use wrapper's `wrapperGetLocalStorage` and `wrapperSetLocalStorage`. However, I don't know if this is possible because browsers prevent accessing and modifying `localStorage` object in iframe sandbox.

* `History`: Use `wrapperGetState`, `wrapperPushState`, `wrapperReplaceState` and correctly handle URL rewrites in other `History`'s objects. This would be easier because you can access them inside sandbox, but they just don't do anything.

* As well as some other wrapper actions like `wrapperOpenWindow` and `wrapperSetTitle`.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.