Lua Legacy Window

This global table holds data about some things.

This is part of the legacy api which is deprecated and no longer maintained.

window.browser
Properties Values
Editable Yes

Contents

  • browser - the name of the browser used
  • location - URL of the website
  • query - query parameters

Query

The query is a table with key being the param name and value its value. Some important things:

  • Duplicate last overwrites others. ?cat=1&cat=2 then { cat: '2' }.
  • Case sensitive. ?Cat=1&cat=2 then { Cat: '1', cat: '2' }.
  • Multi = are not ignored. ?cat=1=2 then { cat: '1=2' }.
  • Special characters are decoded. ?kitty%20cat=makes%20meow then { 'kitty cat': 'makes meow' }.
  • Trailing spaces are not trimmed. ? cat = 1 then { ' cat ': ' 1 ' }.
  • Blank keys or values are fine. ?cat=&=cat&dog then { cat: '', '': 'cat', dog: '' }.
  • Trailing ? & are ignored. ?cat& then { cat: '' } or ? then {}. But ?= then { '': '' }.

Support

  Napture Bussinga YAB WXV Core
window None v0.0.1 None 1
browser None v0.0.1 None 1 *
true_browser No No No Yes
location None v0.0.1 None 1
query None v0.0.1 None 1

*window.browser imitates bussinga’s agent, the true client can be accessed in true_browser