Module:ScriptItem: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 83: Line 83:


function p.showEventPage(frame)
function p.showEventPage(frame)
local parts = { "Parameters", "Cancellable" }
local parts = { "Parameters", "Attributes" }
return p.showPage(frame, parts)
return p.showPage(frame, parts)
end
end
Line 559: Line 559:
end
end


function p.cancellable(frame)
function p.attributes(frame)
local args = p.getArgs(frame)
local args = p.getArgs(frame)
local headers = nil--{ "Type", "Description" }
local rows = {}
if p.isCancellable(frame) then
if p.isCancellable(frame) then
return "This "..args.type.." can be cancelled using [[event.preventDefault|event.preventDefault]]."
rows[1] = { 'cancellable', 'This '..args.type..' can be cancelled. be changed, by using [[event.preventDefault|event.preventDefault]].' }
else
else
return "This "..args.type.." can't be cancelled."
rows[1] = { p.formatType('const', frame), 'This '..args.type..' cannot be cancelled.' }
end
end
local widths = { 120, 400 }
return p.table(headers, rows, widths, 'wikitable-returns wikitable')
end
end


6,834

edits