Skip to content

Sources & Maintenance

Official Drupal Documentation: - JavaScript API Overview - Adding Assets to Modules/Themes - JavaScript Coding Standards - AJAX API Documentation - JavaScript Testing with Nightwatch - Accessibility Tools for JavaScript - Using Single Directory Components

Drupal Core Changes: - JavaScript Build Process Removed - Drupal 10 ES6 support - Remove jQuery.once() Dependency - once() migration - ES6 Files Deprecated - Direct ES6 in .js files - drupalSettings CSP Compatible - JSON settings format - JavaScript Aggregation and Defer - Core issue - Header vs Footer JavaScript - Default footer loading

Community Resources: - Drupal at your Fingertips - JavaScript (Selwyn Polit) - Comprehensive JS patterns, behaviors, libraries (formerly d9book at github.com/selwynpolit/d9book) - Drupal at your Fingertips - Forms (Selwyn Polit) - AJAX in forms, library attachment patterns - Drupal Book: Replace jQuery.once - Lullabot: Nightwatch in Drupal Core - Lullabot: Single Directory Components - Drupalize.me: SDC Anatomy - Drupalize.me: Nightwatch Testing - Preston So: ES6 for Drupal Developers - Debounce Functions in Drupal

Performance and Security: - Deferring CSS/JS Resources - Writing Secure Code for Drupal - DOM XSS Prevention Cheat Sheet - Debounce vs Throttle Visual Guide - Drupal 10 JavaScript Dependency Plan

Code References: - /core/core.libraries.yml - Core library definitions - /core/misc/drupal.js - Core Drupal object and behaviors - /core/misc/ajax.js - AJAX framework - /core/misc/once.js - Once API implementation - /core/misc/details-aria.js - Accessibility behavior pattern - /core/misc/progress.js - Complex behavior example - /modules/contrib/webform/webform.libraries.yml - Complex contrib patterns - /modules/contrib/webform/js/ - Real-world behavior examples