- Drop jquery and waitForImages
- Remove
onLoad
method inAbstractPage
andAbstractBlock
- Change
classFactory.getBlockInstance()
method parameters order (page, $cont, nodeType
). Make sure to update yourclassFactory
file - You can now switch
classFactory.getBlockInstance()
toasync
and dynamically load your modules withimport('yourModule').then()
, see example for more details. - Optional web worker feature to load pages content. Add
workerEnabled
router option to true to enable
- Change
classFactory.getPageInstance()
method parameters order and removedisHome
parameter - Added new
data
object parameter in historyadd
method if you want to manually add specific data
- Big refactoring of all classes
- No more need to bind manually all links in Pages, Blocks or Nav, everything is handled by Pjax class
- Removed all Router constructor arguments except for
options
array AbstractNav
has been removed, do not extend it anymore.- Starting-blocks wrapper default ID is now
sb-wrapper
, you can change it in yourRouter
options (i.e.ajaxWrapperId: 'main-container'
) - jquery, loglevel and jquery.waitforimages are declared external. You should provide them manually as file or as CDN in your project.
- Pjax is now using native
window.fetch
methods to perform XHR requests. Make sure to use necessary polyfills. If window.fetch is not supported, ajax will be disabled.