Gtk.Clipboard.prototype.request_targets

function request_targets(callback:Gtk.ClipboardTargetsReceivedFunc):void {
    // Gjs wrapper for gtk_clipboard_request_targets()
}

Requests the contents of the clipboard as list of supported targets. When the list is later received, callback will be called.

The @targets parameter to callback will contain the resulting targets if the request succeeded, or null if it failed.

Since 2.4

callback

a function to call when the targets are received, or the retrieval fails. (It will always be called one way or the other.)