SlideShare a Scribd company logo
Magento and jQuery
Sergii Ivashchenko
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Current jQuery version 1.12.4
(May 20, 2016)
Latest jQuery version 3.6.0
(March 2, 2021)
Goal
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Process
Prepare codebase Update JS libraries Update jQuery and plugins
2.4-develop branch
New features
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
What’s new
 Performance improvements
 Bug fixes
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Promises/A+ support for Deferreds
$.ajax("/status")
.done(function(data) {
dd();
// console shows: ”dd is not a function"
// no further code executes in this function
})
.fail(function(arg) {
// this code does not execute since the exception
was not caught
});
$.ajax("/status")
.then(function(data) {
dd();
// console shows "jQuery.Deferred exception:
dd is not a function"
// no further code executes in this function
})
.catch(function(error) {
// this code executes after the error above
// error is an Error object, ”dd is not a
function"
});
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
New signature for jQuery.get() AND jQuery.post()
$.post({
url: '/foo’,
data: bar
})
$.post('/foo', bar)
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
for...of loops can be used on jQuery collections
var elems =
$(".someclass");
$.each(function(i, elem) {
});
var elems =
$(".someclass");
for ( let elem of elems ) {
}
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
New method jQuery.escapeSelector()
$( "#id.with.dots" ) $( "#" + $.escapeSelector( “id.with.dots" ) )
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
jQuery.readyException
$(function() {
throw new Error('boom!')
});
jQuery.ready.then(function() {
throw new Error('boom');
}).fail(function(error) {
throw error;
});
jQuery.readyException = function(error) {
throw error;
};
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
The .addClass(), .removeClass(), and .toggleClass() methods now
accept an array of classes.
$( ”#id" ).addClass( "selected highlight" );
$( ”#id" ).addClass( [
"selected”,
“highlight”
]);
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Other features
 SVG documents support class operations
 Added support for custom CSS properties
 Added support for <template> elements to the .contents() method
 Locking a Callback prevents only future list execution
 jQuery.ready promise is formally supported
 Animations now use requestAnimationFrame
 nonce and nomodule support
Breaking changes
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
jQuery.ajax() Promises/A+ compliance
$.ajax( "example.php" )
.done(function() {
alert( "success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "complete" );
});
$.ajax( "example.php" )
.success(function() {
alert( "success" );
})
.error(function() {
alert( "error" );
})
.complete(function() {
alert( "complete" );
});
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
jQuery.htmlPrefilter
 jQuery( "<div/><span/>" );
 Previous behavior can be restored using jQuery Migrate 3.2.0 or newer
 jQuery.UNSAFE_restoreLegacyHtmlPrefilter();
<div></div>
<span></span>
<div>
<span></span>
</div>
jQuery 3.5
Previously
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Self-closing tags
 <area />
 <base />
 <br />
 <col />
 <embed />
 <hr />
 <img />
 <input />
 <link />
 <meta />
 <param />
 <source />
 <track />
 <wbr />
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
.data() names containing dashes
var $div = $("<div />");
$div.data("click-count", 3);
var allData = $div.data();
allData.clickCount; // 3
allData["click-count"]; // undefined
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
jQuery.ajax() does not remove hash from URL
$.ajax( ”host.com#someparameters" )
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Select multiple value with nothing selected returns an empty array
$(”#select-multiple").val(); // previously null,
now []
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Behavior of :hidden and :visible
 An element is considered visible even if height and/or width of zero
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Cross-domain script requests
 dataType: "script" option has to be specified for jQuery.ajax() or jQuery.get()
 jQuery.getScript() is not affected
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Return values on empty sets are undefined
 Dimensional methods: .width(), .height(), .innerWidth(), .innerHeight(), .outerWidth(),
and .outerHeight()
 Offset methods: .offsetTop() and .offsetLeft()
jQuery().height() // undefined instead of null
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Removed functions and properties
 .andSelf()
 jQuery.event.props
 jQuery.event.fixHooks
 .context and .selector
 .load(), .unload() and .error()
 .size()
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Other BIC
 Dropped IE 6–8 support
 jQuery runs in Strict Mode
 document-ready handlers are now asynchronous
 .width(), .height(), .css("width"), and .css("height") can return non-integer values
 .outerWidth() or .outerHeight() on window includes scrollbar width/height
 jQuery.param() no longer converts %20 to a plus sign
 jQuery("#") throws a syntax error
 .wrapAll(function) only calls the function once
 .removeAttr() no longer sets properties to false
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
Deprecations
 .toggleClass()
 jQuery.unique()
 jQuery.parseJSON()
 .ready()
 .bind()
 .delegate()
 jQuery.holdReady
 jQuery.nodeName
 .on("ready", fn)
 jQuery.now
 jQuery.isWindow
 jQuery.camelCase
 jQuery.proxy
 jQuery.type
 jQuery.isNumeric
 jQuery.isFunction
 Event aliases
 jQuery.isArray
 :first, :last, :eq, :even, :odd, :lt, :gt, and :nth
 jQuery.expr[":"] and jQuery.expr.filters
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
© 2021 Adobe. All Rights Reserved. Adobe Confidential.
How to prepare
 jQuery Migrate and repo documentation
 Upgrade Guides https://jquery.com/upgrade-guide/
 Release blog posts http://blog.jquery.com/
 jQuery API documentation -> Deprecated -> “Removed” label
Watch 2.4-develop branch and stay tuned for our updates!
Migration to jQuery 3.5.x

More Related Content

What's hot

jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
Bedis ElAchèche
 
jQuery
jQueryjQuery
jQuery 1.7 Events
jQuery 1.7 EventsjQuery 1.7 Events
jQuery 1.7 Eventsdmethvin
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the Things
Scott Gardner
 
jQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and BlingjQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and Bling
Doug Neiner
 
jQuery for Sharepoint Dev
jQuery for Sharepoint DevjQuery for Sharepoint Dev
jQuery for Sharepoint Dev
Zeddy Iskandar
 
jQuery Presentation
jQuery PresentationjQuery Presentation
jQuery Presentation
Rod Johnson
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
velveeta_512
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Treeadamlogic
 
jQuery Loves Developers - Oredev 2009
jQuery Loves Developers - Oredev 2009jQuery Loves Developers - Oredev 2009
jQuery Loves Developers - Oredev 2009
Remy Sharp
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQueryAngel Ruiz
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
Rob Bontekoe
 
Reactive Type-safe WebComponents
Reactive Type-safe WebComponentsReactive Type-safe WebComponents
Reactive Type-safe WebComponents
Martin Hochel
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
Claude Tech
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
dmethvin
 
JQuery Comprehensive Overview
JQuery Comprehensive OverviewJQuery Comprehensive Overview
JQuery Comprehensive Overview
Mohamed Loey
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
Mark Rackley
 

What's hot (20)

jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 
jQuery
jQueryjQuery
jQuery
 
jQuery 1.7 Events
jQuery 1.7 EventsjQuery 1.7 Events
jQuery 1.7 Events
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the Things
 
jQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and BlingjQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and Bling
 
jQuery for Sharepoint Dev
jQuery for Sharepoint DevjQuery for Sharepoint Dev
jQuery for Sharepoint Dev
 
jQuery Presentation
jQuery PresentationjQuery Presentation
jQuery Presentation
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
jQuery Presentasion
jQuery PresentasionjQuery Presentasion
jQuery Presentasion
 
jQuery Loves Developers - Oredev 2009
jQuery Loves Developers - Oredev 2009jQuery Loves Developers - Oredev 2009
jQuery Loves Developers - Oredev 2009
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Reactive Type-safe WebComponents
Reactive Type-safe WebComponentsReactive Type-safe WebComponents
Reactive Type-safe WebComponents
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
 
JQuery Comprehensive Overview
JQuery Comprehensive OverviewJQuery Comprehensive Overview
JQuery Comprehensive Overview
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
 
jQuery Introduction
jQuery IntroductionjQuery Introduction
jQuery Introduction
 

Similar to Migration to jQuery 3.5.x

Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Nagaraju Sangam
 
jQuery (BostonPHP)
jQuery (BostonPHP)jQuery (BostonPHP)
jQuery (BostonPHP)
jeresig
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
Siarzh Miadzvedzeu
 
jQuery (MeshU)
jQuery (MeshU)jQuery (MeshU)
jQuery (MeshU)
jeresig
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
Matt Raible
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentation
Mevin Mohan
 
Svcc 2013-d3
Svcc 2013-d3Svcc 2013-d3
Svcc 2013-d3
Oswald Campesato
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)
Oswald Campesato
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slideshelenmga
 
Dojo and Adobe AIR
Dojo and Adobe AIRDojo and Adobe AIR
Dojo and Adobe AIR
Nikolai Onken
 
jQuery
jQueryjQuery
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
Guy Royse
 
Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017
Matt Raible
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
Alexander Zamkovyi
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
Shumpei Shiraishi
 
前端概述
前端概述前端概述
前端概述
Ethan Zhang
 
Vaadin Components
Vaadin ComponentsVaadin Components
Vaadin Components
Joonas Lehtinen
 
Web Components With Rails
Web Components With RailsWeb Components With Rails
Web Components With Rails
Boris Nadion
 

Similar to Migration to jQuery 3.5.x (20)

Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
jQuery (BostonPHP)
jQuery (BostonPHP)jQuery (BostonPHP)
jQuery (BostonPHP)
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
jQuery (MeshU)
jQuery (MeshU)jQuery (MeshU)
jQuery (MeshU)
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentation
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
 
Svcc 2013-d3
Svcc 2013-d3Svcc 2013-d3
Svcc 2013-d3
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
 
Dojo and Adobe AIR
Dojo and Adobe AIRDojo and Adobe AIR
Dojo and Adobe AIR
 
jQuery
jQueryjQuery
jQuery
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
前端概述
前端概述前端概述
前端概述
 
Vaadin Components
Vaadin ComponentsVaadin Components
Vaadin Components
 
Web Components With Rails
Web Components With RailsWeb Components With Rails
Web Components With Rails
 

More from StanislavIdolov

Performance pack introduction
Performance pack introduction Performance pack introduction
Performance pack introduction
StanislavIdolov
 
Live search presentation
Live search presentationLive search presentation
Live search presentation
StanislavIdolov
 
New contribution delivery channel
New contribution delivery channelNew contribution delivery channel
New contribution delivery channel
StanislavIdolov
 
Predictive test selection with machine learning
Predictive test selection with machine learning Predictive test selection with machine learning
Predictive test selection with machine learning
StanislavIdolov
 
Magento Community Hangouts 10 Feb, 2021 Performance Improvements
Magento Community Hangouts  10 Feb, 2021 Performance ImprovementsMagento Community Hangouts  10 Feb, 2021 Performance Improvements
Magento Community Hangouts 10 Feb, 2021 Performance Improvements
StanislavIdolov
 
Magento Community Hangouts 10 Feb, 2021 Composer 2 Support
Magento Community Hangouts  10 Feb, 2021 Composer 2 SupportMagento Community Hangouts  10 Feb, 2021 Composer 2 Support
Magento Community Hangouts 10 Feb, 2021 Composer 2 Support
StanislavIdolov
 
Magento Community Hangouts 10 Feb, 2021 PHP 8 support
Magento Community Hangouts  10 Feb, 2021 PHP 8 supportMagento Community Hangouts  10 Feb, 2021 PHP 8 support
Magento Community Hangouts 10 Feb, 2021 PHP 8 support
StanislavIdolov
 

More from StanislavIdolov (7)

Performance pack introduction
Performance pack introduction Performance pack introduction
Performance pack introduction
 
Live search presentation
Live search presentationLive search presentation
Live search presentation
 
New contribution delivery channel
New contribution delivery channelNew contribution delivery channel
New contribution delivery channel
 
Predictive test selection with machine learning
Predictive test selection with machine learning Predictive test selection with machine learning
Predictive test selection with machine learning
 
Magento Community Hangouts 10 Feb, 2021 Performance Improvements
Magento Community Hangouts  10 Feb, 2021 Performance ImprovementsMagento Community Hangouts  10 Feb, 2021 Performance Improvements
Magento Community Hangouts 10 Feb, 2021 Performance Improvements
 
Magento Community Hangouts 10 Feb, 2021 Composer 2 Support
Magento Community Hangouts  10 Feb, 2021 Composer 2 SupportMagento Community Hangouts  10 Feb, 2021 Composer 2 Support
Magento Community Hangouts 10 Feb, 2021 Composer 2 Support
 
Magento Community Hangouts 10 Feb, 2021 PHP 8 support
Magento Community Hangouts  10 Feb, 2021 PHP 8 supportMagento Community Hangouts  10 Feb, 2021 PHP 8 support
Magento Community Hangouts 10 Feb, 2021 PHP 8 support
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 

Migration to jQuery 3.5.x

  • 2. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Current jQuery version 1.12.4 (May 20, 2016) Latest jQuery version 3.6.0 (March 2, 2021) Goal
  • 3. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Process Prepare codebase Update JS libraries Update jQuery and plugins 2.4-develop branch
  • 5. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. What’s new  Performance improvements  Bug fixes
  • 6. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Promises/A+ support for Deferreds $.ajax("/status") .done(function(data) { dd(); // console shows: ”dd is not a function" // no further code executes in this function }) .fail(function(arg) { // this code does not execute since the exception was not caught }); $.ajax("/status") .then(function(data) { dd(); // console shows "jQuery.Deferred exception: dd is not a function" // no further code executes in this function }) .catch(function(error) { // this code executes after the error above // error is an Error object, ”dd is not a function" });
  • 7. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. New signature for jQuery.get() AND jQuery.post() $.post({ url: '/foo’, data: bar }) $.post('/foo', bar)
  • 8. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. for...of loops can be used on jQuery collections var elems = $(".someclass"); $.each(function(i, elem) { }); var elems = $(".someclass"); for ( let elem of elems ) { }
  • 9. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. New method jQuery.escapeSelector() $( "#id.with.dots" ) $( "#" + $.escapeSelector( “id.with.dots" ) )
  • 10. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. jQuery.readyException $(function() { throw new Error('boom!') }); jQuery.ready.then(function() { throw new Error('boom'); }).fail(function(error) { throw error; }); jQuery.readyException = function(error) { throw error; };
  • 11. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. The .addClass(), .removeClass(), and .toggleClass() methods now accept an array of classes. $( ”#id" ).addClass( "selected highlight" ); $( ”#id" ).addClass( [ "selected”, “highlight” ]);
  • 12. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Other features  SVG documents support class operations  Added support for custom CSS properties  Added support for <template> elements to the .contents() method  Locking a Callback prevents only future list execution  jQuery.ready promise is formally supported  Animations now use requestAnimationFrame  nonce and nomodule support
  • 14. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. jQuery.ajax() Promises/A+ compliance $.ajax( "example.php" ) .done(function() { alert( "success" ); }) .fail(function() { alert( "error" ); }) .always(function() { alert( "complete" ); }); $.ajax( "example.php" ) .success(function() { alert( "success" ); }) .error(function() { alert( "error" ); }) .complete(function() { alert( "complete" ); });
  • 15. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. jQuery.htmlPrefilter  jQuery( "<div/><span/>" );  Previous behavior can be restored using jQuery Migrate 3.2.0 or newer  jQuery.UNSAFE_restoreLegacyHtmlPrefilter(); <div></div> <span></span> <div> <span></span> </div> jQuery 3.5 Previously
  • 16. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Self-closing tags  <area />  <base />  <br />  <col />  <embed />  <hr />  <img />  <input />  <link />  <meta />  <param />  <source />  <track />  <wbr />
  • 17. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. .data() names containing dashes var $div = $("<div />"); $div.data("click-count", 3); var allData = $div.data(); allData.clickCount; // 3 allData["click-count"]; // undefined
  • 18. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. jQuery.ajax() does not remove hash from URL $.ajax( ”host.com#someparameters" )
  • 19. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Select multiple value with nothing selected returns an empty array $(”#select-multiple").val(); // previously null, now []
  • 20. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Behavior of :hidden and :visible  An element is considered visible even if height and/or width of zero
  • 21. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Cross-domain script requests  dataType: "script" option has to be specified for jQuery.ajax() or jQuery.get()  jQuery.getScript() is not affected
  • 22. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Return values on empty sets are undefined  Dimensional methods: .width(), .height(), .innerWidth(), .innerHeight(), .outerWidth(), and .outerHeight()  Offset methods: .offsetTop() and .offsetLeft() jQuery().height() // undefined instead of null
  • 23. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Removed functions and properties  .andSelf()  jQuery.event.props  jQuery.event.fixHooks  .context and .selector  .load(), .unload() and .error()  .size()
  • 24. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Other BIC  Dropped IE 6–8 support  jQuery runs in Strict Mode  document-ready handlers are now asynchronous  .width(), .height(), .css("width"), and .css("height") can return non-integer values  .outerWidth() or .outerHeight() on window includes scrollbar width/height  jQuery.param() no longer converts %20 to a plus sign  jQuery("#") throws a syntax error  .wrapAll(function) only calls the function once  .removeAttr() no longer sets properties to false
  • 25. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. Deprecations  .toggleClass()  jQuery.unique()  jQuery.parseJSON()  .ready()  .bind()  .delegate()  jQuery.holdReady  jQuery.nodeName  .on("ready", fn)  jQuery.now  jQuery.isWindow  jQuery.camelCase  jQuery.proxy  jQuery.type  jQuery.isNumeric  jQuery.isFunction  Event aliases  jQuery.isArray  :first, :last, :eq, :even, :odd, :lt, :gt, and :nth  jQuery.expr[":"] and jQuery.expr.filters
  • 26. © 2021 Adobe. All Rights Reserved. Adobe Confidential. © 2021 Adobe. All Rights Reserved. Adobe Confidential. How to prepare  jQuery Migrate and repo documentation  Upgrade Guides https://jquery.com/upgrade-guide/  Release blog posts http://blog.jquery.com/  jQuery API documentation -> Deprecated -> “Removed” label Watch 2.4-develop branch and stay tuned for our updates!