HelloZeroNet / HelloZeroNet/ZeroHello
Monkey-patching browser APIs with ZeroFrame
- Ngôn ngữ chính
- JavaScript
- Star
- 73
- Fork
- 69
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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`.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- frontend, web-dev
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100