[← All talks](/talks)

# Javascript Pulp Fiction

Drupal Dev Days Szeged, 2014

[Open the slides (PDF)](https://tresbien.tech/sites/default/files/talks/javascript-pulp-fiction.pdf)

 

 

Drupal 8 frontend, told by the characters of Pulp Fiction. How the theme layer looks to HTML/CSS developers and to JS developers, and why JS should select elements with `data-` attributes and leave classes to themers.

Then the story of how Overlay left core: 10 lines of JS, a UX napkin, months of UX testing, and an `escapeAdmin.js` that stores the last front-end page in sessionStorage. It ends with the rules for JS in Drupal 8: use JSHint, keep variables out of the global scope, declare dependencies in `*.libraries.yml` and stop using `drupal_add_js()`.



 

Event

Drupal Dev Days

 

 

City

Szeged

 

 

Language

English

 

 

Slides

Document

[javascript-pulp-fiction.pdf](/sites/default/files/talks/javascript-pulp-fiction.pdf) (8.68 MB)

 



 

 

Companion code



 

Related