question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

event.path usage is discouraged

See original GitHub issue

event.path was introduced in Chrome for Shadow DOM V0 and is available for V1 in Chrome as well, but the usage here doesn’t make sense.

https://github.com/tinymce/tinymce/blob/c433e8464819cb890bd69b4c0ff000ede6afe076/src/core/main/ts/api/dom/EventUtils.ts#L81

If there’s any specific reason to keep the ‘event.path’ access there, please use only event.composedPath() as it’s standard and is more future-proof (once Firefox supports or Edge supports it).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
1337GameDevcommented, May 13, 2022

This issue seems to be current in TinyMCE 6. Including TinyMCE in latest chrome will present this warning.

2reactions
TakayoshiKochicommented, Jul 25, 2018

Yeah, it would be that simple, or you can completely remove event.path because Blink-based browsers are the only ones that implement event.path, but also implement event.composedPath() so it makes very little sense you keep code for event.path as a fallback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

event.path is undefined running in Firefox - Stack Overflow
The path property of Event objects is non-standard. The standard equivalent is composedPath , which is a method. But it's new.
Read more >
Event Handling in AEM 6.4 - Experience League Community
Hi, We have various event handlers which are not working in 6.4 since various attributes( resourceChangedAttributes etc.)
Read more >
Event.composedPath() - Web APIs - MDN Web Docs
The composedPath() method of the Event interface returns the event's path which is an array of the objects on which listeners will be ......
Read more >
UI Events - W3C
A content authoring tool conforms to UI Events if it produces content which uses the event types and § 3.1 Event dispatch and...
Read more >
A crash course in how DOM events work - Bitovi
This approach is highly discouraged. It is a very inflexible method of defining event behavior, and intermixes the structure of an HTML page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found