diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/null-browser/api.lua (renamed from lua/api.lua) | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/api.lua b/lua/null-browser/api.lua index b6495e0..d2e0be7 100644 --- a/lua/api.lua +++ b/lua/null-browser/api.lua @@ -1,9 +1,13 @@ +print("FOOOOOOOOOOBARRRRRR") + local function shallow_copy(t) local t2 = {} for k, v in pairs(t) do t2[k] = v end return t2 end +web.event = web.event or {} + web.event.add_listener = function(events, opts) opts = shallow_copy(opts or {}) if type(events) ~= "table" then events = { events } end |
