HelloZeroNet / HelloZeroNet/ZeroHello
Monkey-patching browser APIs with ZeroFrame
- Langage dominant
- JavaScript
- Étoiles
- 73
- Forks
- 69
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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`.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start at the existing AJAX browser-API monkey-patching and trace how ZeroFrame wrapper actions are invoked. Assess the feasibility of intercepting localStorage and History, including URL rewrites, then consider wrapperOpenWindow and wrapperSetTitle; done means supported third-party libraries can use these APIs without ZeroNet-specific modifications.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- frontend, web-dev
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100