cycle-pushstate-driver:用于History API的Cycle.js驱动程序

时间:2021-05-01 11:55:21
【文件属性】:
文件名称:cycle-pushstate-driver:用于History API的Cycle.js驱动程序
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-01 11:55:21
JavaScript 循环PushState驱动程序 用于。 设计选择 这是一个非常小的Cycle.js驱动程序,它仅隔离了history.pushState调用和popstate事件。 它不假设您要如何过滤和转换单击/触摸事件流以提出推送路径。 它也不会为您做e.preventDefault() 。 在没有pushState支持的情况下,它可使链接像普通链接一样工作。 这意味着您的preventDefault驱动程序需要知道不捕获这些单击/触摸事件。 最后,它当前不支持history.replaceState或pushState的状态参数 如果您希望使用能解决所有这些情况的驱动程序,则可以考虑使用驱动程序,该驱动程序是针对同一问题的包括电池的方法。 原料药 makePushStateDriver () 返回一个驱动程序,该驱动程序在输入路径上调用history.pushState ,并输出发送到push
【文件预览】:
cycle-pushstate-driver-master
----package.json(855B)
----test()
--------index.js(3KB)
----src()
--------index.js(687B)
----.npmignore(9B)
----.gitignore(37B)
----lib()
--------.npmignore(0B)
--------.gitignore(26B)
----README.md(4KB)

网友评论