mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Remove html api, update docs
This commit is contained in:
@@ -2,13 +2,21 @@ local event = require("event.event")
|
||||
local const = require("druid.const")
|
||||
local component = require("druid.component")
|
||||
|
||||
---The component that handles the back handler action, like backspace or android back button
|
||||
---Component to handle back button. It handles Android back button and Backspace key.
|
||||
---
|
||||
---### Setup
|
||||
---Create back handler component with druid: `druid:new_back_handler(callback)`
|
||||
---
|
||||
---### Notes
|
||||
---- Key triggers in `input.binding` should be setup for correct working
|
||||
---- It uses a key_back and key_backspace action ids
|
||||
---@class druid.back_handler: druid.component
|
||||
---@field on_back event Trigger on back handler action, fun(self, params)
|
||||
---@field params any|nil Custom args to pass in the callback
|
||||
local M = component.create("back_handler")
|
||||
|
||||
|
||||
---The Back Handler constructor
|
||||
---@param callback function|nil The callback to call when the back handler is triggered
|
||||
---@param params any? Custom args to pass in the callback
|
||||
function M:init(callback, params)
|
||||
|
Reference in New Issue
Block a user