mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
When scripts receive a DataTransferItem from any IDL method, the spec requires we return the same DataTransferItem for a particular item in the drag data store. Meaning, we cannot just create these on the fly as needed. To do this, we store a list of DataTransferItem on the DataTransfer object. We will return one of these objects any time one is requested by a script. It feels a bit weird to have the DataTransfer object store: the drag data store, a DataTransferItemList, and a list of DataTransferItem. But this is how other engines implement this as well. It basically has to be this way as DataTransferItemList is just a proxy to the DataTransfer - meaning, DataTransfer is the source of truth for all IDL access.
9.5 KiB
9.5 KiB