gluon-web: add view helper for JSON-encoded values
Can be used for inserting Lua values into inline JS code.
This commit is contained in:
parent
897ee73d14
commit
a2be178ce8
@ -87,6 +87,7 @@ local function dispatch(config, http, request)
|
||||
pcdata = util.pcdata,
|
||||
urlencode = proto.urlencode,
|
||||
attr = attr,
|
||||
json = json.stringify,
|
||||
url = function(path) return build_url(http, path) end,
|
||||
}, { __index = _G }))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user