Skip to content

Commit 7ebec79

Browse files
committed
Add caching support to DynamicFrameRouter
Enabled by setting the `:caching` argument on the router, it will cache the different frames and if a cached frame is loaded again it will be fetched from the cache instead. Changes to the DOM are persisted in the cache as this uses [cloneNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode). The only problem I know of with this approach is that event listeners are _not_ cloned. We can maybe fix this ourselves by wrapping `addEventListener`, apparently this is how jQuery handled it ([source](https://stackoverflow.com/a/15411683/15970183)).
1 parent 8250d83 commit 7ebec79

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

build/static/js/binder/core/dynamic_frame.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)