Skip to content

Remove jQuery dependancy for Site js

Sam Sehnert requested to merge hotfix/jquery_removal into master

What I did

  • Removed dependance on jQuery for SiteJS.

Implications

This might affect the way session expiry is handled. Needs careful testing. Note that session.js still depends on jQuery.

Setup

  • Update a site to use this version of Zon core (e.g, use the Zon template against this commit).
  • Remove global.js and jQuery includes from the app carabiner file.
  • Set the session timeout in site/application/config/config.php to something short-lived.
  • Enable debugging mode in sitejs (E.g., Site.debugging = true)
  • Open multiple tabs
  • Add some event handlers for cross tab events in other tabs (E.g., el.addEventListener('something', function() { console.log('SOMETHING: ', this, arguments);});)
  • Make some Site.broadcast_event() calls to trigger your handlers.
  • Ensure the events are firing cross tab.

How to test

Task: https://preview.gotasman.com/dashboard/tasks/remove-dependance-on-jquery-from-site-js-51206

Merge request reports