[← All talks](/talks)

# Upgrade your javascript to Drupal 8

DrupalCon Prague, 2013

[Open the slides (PDF)](https://tresbien.tech/sites/default/files/talks/upgrade-your-javascript-to-drupal-8.pdf)

 

 

What module developers have to change in their JavaScript for Drupal 8. On the JS side it's mostly search and replace: `Drupal.settings` becomes `drupalSettings`, `Drupal.theme.prototype` becomes `Drupal.theme`. On the PHP side `drupal_add_js()` and `scripts[]` are out, scripts are declared as libraries and added with `#attached`.

Then the why: Drupal 7 ships jQuery 1.4.4 and loads jQuery and drupal.js on every page. And what's new in Drupal 8: jQuery 2, Backbone, Underscore, and APIs like `Drupal.announce`, `Drupal.displace`, `Drupal.debounce` and `Drupal.dialog`.





 

 

Event

DrupalCon

 

 

City

Prague

 

 

Language

English

 

 

Slides

Document

[upgrade-your-javascript-to-drupal-8.pdf](/sites/default/files/talks/upgrade-your-javascript-to-drupal-8.pdf) (16.2 MB)

 



 

 

Companion code



 

Related