You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jason Godesky edited this page Aug 4, 2026
·
1 revision
getDroppedDocument is a method that takes an HTML element, finds the data-entry-id on it or its nearest ancestor, looks that ID up in a specified Collection, and returns the document (if found).
Parameters
el: HTMLElement
The HTML element to start from — usually from the target property of a MouseEvent.
collection: foundry.utils.Collection<string, T>
The collection to search in (e.g., game.actors or game.items).
Returns
The document that the clicked item refers to or null if it could not be found.