Module chrome

Add custom luakit:// scheme rendering functions

This module provides a convenient interface for other modules to add luakit:// chrome pages, with features like a shared theme, error reporting, and Lua to JavaScript function bridge management.

Functions

chrome.available_handlers ()

Retrieve a list of the currently registered luakit:// handlers.

Return Values

  • {string}
    A list of luakit:// handler names, in alphabetical order.

chrome.add (page, func, on_first_visual_func, export_funcs)

Register a chrome page URI with an associated handler function.

Parameters

  • page
    Type: string
    The name of the chrome page to register.
  • func
    Type: function
    The handler function for the chrome page.
  • on_first_visual_func
    Type: function
    An optional handler function for the chrome page, called when the page first finishes loading.
  • export_funcs
    Type: table
    An optional table of functions to export to JavaScript.

chrome.remove (page)

Remove a regeistered chrome page.

Parameters

  • page
    Type: string
    The name of the chrome page to remove.

Properties

chrome.stylesheet

Type: string
Read-write
Common stylesheet that can be sourced from several chrome modules for a consitent looking theme.

Attribution

Copyright