crossbind
GitHub
← All extensions

page-drops

The paths of files dropped on a desktop page, which a web page never gets.

Package @crossbind/extension-page-dropsnpm ↗Source ↗

An app has it by having @crossbind/core-app-host, which lists it as a dependency: there is nothing to install or list.

What it does

A desktop page hears of the files its user drops on it as the event drop, { paths, x, y }: their absolute paths and where they were dropped, which a web page never gets. The page's own drop event goes on, with its Files.

JavaScript
import { events } from 'crossbind/app';
 
events.on('drop', ({ paths }) => importAll(paths));

Platforms

macOS, Linux and Windows.

Replace or leave out

It holds the role page-drops. An extension that gives replaces: 'page-drops' takes it; app: { without: ['page-drops'] } in crossbind.config.js leaves it out. The guide shows how, and extensions.md what a replacement answers.

extensions.md has the hooks a replacement answers.

Type to search every guide page and section.
↑↓ navigate↵ openesc close