When popstate occurs and snippets are loaded from the snippet cache, we need to manually dispatch the load event. This used to be dispatched immediately after popstate, which resulted in the load event being dispatched before the snippets were actually restored from the cache by Naja. Now we schedule the dispatch after the snippets have been restored using the setTimeout method.
When
popstate
occurs and snippets are loaded from the snippet cache, we need to manually dispatch the load event. This used to be dispatched immediately afterpopstate
, which resulted in the load event being dispatched before the snippets were actually restored from the cache by Naja. Now we schedule the dispatch after the snippets have been restored using thesetTimeout
method.