Open
Description
Description
Trying to read composedPath on event throws exception
Steps to Reproduce
- create LWC app like in this playground: https://developer.salesforce.com/docs/component-library/tools/playground/9Xurl1YY9/1/edit
- click on Click me div
Expected Results
div
(9) ["DIV", "DIV", undefined, "C-APP", "MAIN", "BODY", "HTML", undefined, undefined]
root
(9) ["DIV", "DIV", undefined, "C-APP", "MAIN", "BODY", "HTML", undefined, undefined]
document
(9) ["DIV", "DIV", undefined, "C-APP", "MAIN", "BODY", "HTML", undefined, undefined]
Actual Results
div
TypeError: Illegal invocation
at Object.composedPathValue (aura_proddebug.js:473)
at Object.SecureFunction (aura_proddebug.js:18838)
at Proxy.eval (active_element_test.js:61)
at HTMLDivElement.handleEvent (aura_proddebug.js:16832)
at HTMLDivElement.fnOrObj.$$lwcEventWrapper$$ (aura_proddebug.js:2471)
root
TypeError: Illegal invocation
at Object.composedPathValue (aura_proddebug.js:473)
at Object.SecureFunction (aura_proddebug.js:18838)
at Object.eval (active_element_test.js:52)
at DocumentFragment.handleEvent (aura_proddebug.js:16832)
at shadowRootWrappedListener (aura_proddebug.js:567)
at aura_proddebug.js:650
at Array.forEach (<anonymous>)
at invokeListenersByPlacement (aura_proddebug.js:647)
at HTMLElement.domListener (aura_proddebug.js:657)
document
TypeError: Illegal invocation
at Object.composedPathValue (aura_proddebug.js:473)
at Object.SecureFunction (aura_proddebug.js:18838)
at Object.eval (active_element_test.js:43)
at HTMLDocument.handleEvent (aura_proddebug.js:16832)
at HTMLDocument.fnOrObj.$$lwcEventWrapper$$ (aura_proddebug.js:2471)
Browsers Affected
Tested in Chrome
Version
- "lwc-engine": "1.1.13-224.4"
Additional context/Screenshots
I found a PR which add event.path
property: #859
event.path
works like composedPath
is supposed to, but since it is not in the spec I am not sure if it is safe to use it. I assume it can be removed without a notice? event.composedPath
is part of spec though and it would be great to use it, if it wouldn't throw.
Activity