Module taborder
Rules for where to put new tabs
When a new tab is opened in a window, a tab order function is called to determine where in the tab list it should be placed. window.new_tab() accepts a tab order function as parameter. If this is not sent, taborder.default is used if the new tab will be immediately switched to. Otherwise, i.e. if a background tab is opened, taborder.bgdefault is used.
A tab order function receives the current window, and the view that is being opened as parameters. In return, it gives the index at which the new tab should be put.
Functions
taborder.first ()
Tab order function: Always insert new tabs before all other tabs.
taborder.last (w)
Tab order function: Always insert new tabs after all other tabs.
Parameters
-
wType: tableThe current window table.
taborder.after_current (w)
Tab order function: Always insert new tabs after the current tab.
Parameters
-
wType: tableThe current window table.
taborder.before_current (w)
Tab order function: Always insert new tabs before the current tab.
Parameters
-
wType: tableThe current window table.
taborder.by_origin (w, newview)
Tab order function: Put new child tab next to the parent after unbroken chain of descendants. Logical way to use when one "queues" background-followed links.
Parameters
-
wType: tableThe current window table.
-
newviewType: widgetThe new webview widget.
Properties
taborder.default
taborder.default_bg
taborder.kidsof
Attribution
Copyright
- 2010 Henrik Hallberg