Module:Sandbox/Awesome Aasim/Frame
Jump to navigation
Jump to search
File:Test Template Info-Icon - Version (2).svg Module documentation[view] [edit] [history] [purge]
Lua error in Module:I18n at line 384: attempt to index field 'data' (a nil value).
--- This is a debugging module that simply tabulates the arguments passed into
-- the frame.
-- @module frame
-- @alias p
local p = {}
p.args = function(frame)
local out = mw.html.create("table")
out:addClass('wikitable')
out
:tag("tr")
:tag("th")
:wikitext('Argument')
:done()
:tag('th')
:wikitext('Contents')
:done()
for k,v in pairs(frame.args) do
out
:tag('tr')
:tag('td')
:tag('code')
:wikitext(type(k) == type(1) and k or '"' .. k .. '"')
:done()
:tag('td')
:tag('code')
:wikitext(v)
:done()
end
return tostring(out)
end
return p