-
Notifications
You must be signed in to change notification settings - Fork 69
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'swrapperGetLocalStorage
andwrapperSetLocalStorage
. However, I don't know if this is possible because browsers prevent accessing and modifyinglocalStorage
object in iframe sandbox. -
History
: UsewrapperGetState
,wrapperPushState
,wrapperReplaceState
and correctly handle URL rewrites in otherHistory
'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
andwrapperSetTitle
.