Drupal 7 update jQuery.once: jquery.once polyfill
In this post I will share a quick tip on how to upgrade the jquery.once plugin in Drupal 7 without breaking current code.
Drupal 7 ships with jquery.once plugin version 1.2 that dates from 2013. For a project we needed to make code targeting the old 1.x and the 2.x work at the same time. In our case this was core javascript written for 1.x working with some code of ours designed for jquery.once 2.x.
The solution is easy: upgrade the core jquery.once to 2.x and add a polyfill to make it backwards compatible.
Language English More articles...- Profiling Drupal: XHprof, Uprofiler, Tideways with PHP7 on Linux and Windows
- Fixing slow queries and database deadlocks in Drupal without PHP profiling tools
- Running Drupal 8 on PHP 7
- Using LINQ (Language Integrated Queries) in Drupal or how to write queries x5 faster
- Drupal 7 update jQuery.once: jquery.once polyfill
- Benchmarking Drupal 7 on PHP 7-dev
- Build GIT on Windows from Sources
- Hiding the fact that your site runs Drupal
- Drupal on IIS or Apache
- Installing Drupal 8 on Windows and SQL Server
Profiling Drupal: XHprof, Uprofiler, Tideways with PHP7 on Linux and Windows
Being able to analyze and monitor - with ease - the performance of your application is a key part to the success of any web based project. Not only because a slow site might negatively affect conversions, but as Drupal 8 is shifting away from websites and more into complex web based applications, specific business transactions are becoming more important. Considering Drupal's historical poor performance when it comes to "backend" operations, having proper profiling tools is a must.
Language English More articles...- Deploying Drupal Like a Pro - Part 1: File Structure
- PHP 7 nightlies for Windows
- Profiling Drupal: XHprof, Uprofiler, Tideways with PHP7 on Linux and Windows
- Drupal 8 Performance: Moving the service container cache away from the database
- When PHP crashes: how to collect meaningful information and what to do with it
- Hiding the fact that your site runs Drupal
- Deploying changing module dependencies with Drupal
- Deploying Drupal Like a Pro
- Drupal: Add new operators to views filters (such as contained in CSV) or how to override default view's handlers
- Making namespaced callbacks work in Drupal 7 (without hacking core and with bound parameters)