window - Luakit

# Luakit Documentation / Modules / window

# Module `window`

Main window UI

The window module builds the UI for each luakit window, and manages modes, keybind state, and common functions like tab navigation and management.

## Functions

### window.build (w)

Construction function which will build and arrange the window's widgets.

#### Parameters

- w
  Type: table
  The initial window class table.

### window.new (args)

Create a new window table instance.

#### Parameters

- args
  Type: table
  Array of initial tab arguments.

#### Return Values

- table
  The newly-created window table.

### window.ancestor (w)

Get the window that contains the given widget.

#### Parameters

- w
  Type: widget
  The widget whose ancestor to find.

#### Return Values

- table or nil
  The window class table for the window that contains `w`, or `nil` if the given widget is not contained within a window.

## Properties

### window.bywidget

Type: table
Read-only
Map of `window` widgets to window class tables.

### window.methods

Type: {[string]=function}
Read-write
Helper functions which operate on the window widgets or structure.

### window.indexes

Type: {function}
Read-write
Ordered list of class index functions. Other classes (E.g. webview) are able to add their own index functions to this list.

## Attribution

#### Copyright

- 2017 Aidan Holm
- 2012 Mason Larobina