Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Javascript scripting

No security coverage Under active development 5 sites

This module allows you to run JavaScript code on the server side within Drupal. It converts your JavaScript into PHP, ensuring secure and efficient execution similar to spreadsheet formulas, and provides controlled output without direct external script execution.

Javascript scripting

The "JavaScript Scripting" module functions similarly to the formula feature in spreadsheet software, processing input parameters to yield results within a server-side environment.

Like formulas process data in a spreadsheet cell, this module facilitates the execution of user-defined JavaScript snippets within a Drupal field. These scripts, however, extend entity functionality and maintain strict security and control standards, paralleling PHP's server-side execution capabilities.

Highlights:

  • Code Conversion: JavaScript is transpiled into PHP, utilizing Drupal's twig-like caching system to optimize performance and ensure efficient script execution.
  • Server-Side Execution: Circumvents client-side vulnerabilities and negates the need for external JavaScript engines or runtimes.
  • Controlled Scripting: The module disallows direct import or execution of external JavaScript, enforcing tight execution parameters within Drupal’s ecosystem.
  • Explicit Output: Mirroring a spreadsheet cell output that's defined by its formula, this module governs script outputs, avoiding unforeseen side effects on the client-side and the user interface.

Leveraging the flexibility of JavaScript with the security and reliablity of PHP execution, developers are empowered to enrich Drupal entities without compromises in performance or security.

Drupal 10–11

Ask your assistant about Javascript scripting

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jun 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 10–11 Sep 12, 2025
1.0.0 Stable 10–11 Sep 11, 2024
1.0.x-dev Dev 10–11 Jun 27, 2024