lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

I'm writing a document on Luakit, and in my section on making fonts
bigger, I need to give instructions to edit the domain_props table,
which looks something like this:

=====================================================
domain_props = {
    ["all"] = {
        enable_scripts          = false,
        enable_plugins          = false,
        enable_private_browsing = false,
        user_stylesheet_uri     = "",
    },
    ["youtube.com"] = {
        enable_scripts = true,
        enable_plugins = true,
    },
}
=====================================================

It looks like domain_props is a table whose two elements are each
tables, named ["all"] and ["youtube.com"] respectively. I've never seen
something like ["all"] being the name of a table element or a variable
name before. What's going on, is ["all"] an anonymous table containing
element "all"? I just don't understand this syntax, and why somebody
would do this. What am I missing?

Thanks,

SteveT

Steve Litt 
March 2016 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz