Comments (5)
So should I open the issue in Chrome and Safari?
from dom.
the name composedPath indicates it is for DOM Node
I’m unsure what about the name suggests that. While EventTargets constructed directly from user code never have a non-default “get the parent” algorithm presently, IndexedDB interfaces extending EventTarget do — an IDBRequest’s parent is an IDBTransaction and an IDBTransaction’s parent is an IDBDatabase. The usual bubbling behavior applies.
As far as I can tell, composedPath()
for e.g. an IDBRequest success
event should reflect this, and in Firefox, it does:
In Chromium presently, I get an empty array.
from dom.
I think that's right. Would you be willing to add web-platform-tests coverage? Edit: there are some tests for composedPath()
in the /shadow-dom/
directory, not nothing covering this. Perhaps even better to add to /dom/events/
given that shadow trees are not involved in your scenario.
from dom.
I wonder which behavior is expected? Since the name composedPath
indicates it is for DOM Node, the list missing pure EventTarget might be intended.
from dom.
Fair, might be good to wait a bit for others to chime in. In my mind this was always the event's path, but we didn't call it that because it had to be partially obscured in the presence of shadow trees. So I would expect Firefox's behavior and if we ever added the ability for userland EventTarget
to hook into "get the parent" that would be reflected here as well.
(These days we would probably not add an API that so casually reveals open shadow trees however.)
cc @smaug----
from dom.
Related Issues (20)
- Proposal for built-in method to synchronize elements with virtual DOM representation
- another version of `Element.prototype.contains` that considers slotted elements as children HOT 2
- Variable strength aborting HOT 1
- Proposal: DOM APIs in web workers? HOT 42
- clone with clone children flag set should append clone before cloning children HOT 2
- Provide a "deep clone" shorthand HOT 1
- Explicitly update the child's parent HOT 2
- Support for HTML/XML stream parsing/rewriting. HOT 4
- matchMedia-like API for element matches HOT 1
- MutationOvserver and DOMNodeInsertedIntoDocument HOT 1
- Add guidance about using DOMTokenList
- Elements with Fallback, Proxy, Replacement, Substitute, or Surrogate Elements
- Selecting Events with Style HOT 6
- Element.attachShadow should set the declarative flag to false of an existing declarative shadow dom. HOT 4
- Should attachShadow throw or override when an existing declarative shadow root doesn't match? HOT 18
- Corresponding attribute for clonable of ShadowRootInit? HOT 3
- How should `clonable` work in `cloneNode(false)`? HOT 11
- Support for appending a cloned template adjacent to an existing element HOT 1
- Make some ShadowRoot attributes mutable
- Atomic move operation for element reparenting & reordering HOT 43
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dom.