Gio.Notification.prototype.set_default_action_and_target

function set_default_action_and_target(action: String, target: GLib.Variant): void {
    // Gjs wrapper for g_notification_set_default_action_and_target_value()
}
  

Sets the default action of notification to action. This action is activated when the notification is clicked on. It must be an application-wide action (start with "app.").

If @target_format is given, it is used to collect remaining positional parameters into a GVariant instance, similar to GLib.Variant.new.

If target is non-null, action will be activated with target as its parameter.

When no default action is set, the application that the notification was sent on is activated.

Since 2.40

action

an action name

target

a GVariant to use as action's parameter, or null