composedPath() Event Method
THE WORLD'S LARGEST WEB DEVELOPER SITE

composedPath() Event Method

❮ DOM Events ❮ Event Object

Example

What is the event flow of the current event:

function func1(event) {
  alert(event.composedPath());
}
Try it Yourself »

Definition and Usage

The composedPath() method returns an array of objects containing the elements in the event flow, in the correct execution order.


Browser Support

The numbers in the table specify the first browser version that fully supports the method.

Method
composedPath() 53 Not Supported 52 Yes Yes

Syntax

event.composedPath()

Parameters

None

Technical Details

Return Value: An Array of HTML elements

❮ DOM Events ❮ Event Object