HTML events and event listeners

There are different techniques to capture an HTML event and add eventlisteners to an element.

The technique you choose is simply your preference. Pick the method you feel most comfortable with. However, you need to configure one particular permission for inline event handlers, such as <button onclick="btnClick()">Click Me</button>

In plugins, you will need to enable allowCodeGenerationFromStrings if you would like to use the inline event handlers shown above.
IMPORTANT: Please read about the manifest permissions module before you proceed.

System requirements

Please make sure your local environment uses the following application versions before proceeding.

  • Premiere Pro v25.2 or higher
  • UDT v2.1.0 or higher
  • Manifest version v5 or higher

Examples

Declaring event listeners in JavaScript

Copied to your clipboard
<button id="firstButton">Click me</button>
<button id="secondButton">Click me</button>

Declaring inline event handlers

Copied to your clipboard
<button id="thirdButton" onclick='foo(event)'>Click me</button>

Additional notes

  • The above examples will also work for Spectrum Widgets and Spectrum Web Components in UXP.

Reference material

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.