mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-09 16:42:10 +02: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. (cherry picked from commit b3bfd02e64b4e5a0754c157b18dd42427c931923)
9.5 KiB
9.5 KiB