Module:CreateButton: Difference between revisions

From Seven Sages of Rome
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


function p.hello( frame )
function p.hello( frame )
     local div = mw.html.create( 'a' )
     local wrapper = mw.html.create( 'html' )
div
return tostring( wrapper )
    :attr( 'href', 'google.com' )
    :css( 'width', '100%' )
    :wikitext( 'Some text' )
return tostring( div )
end
end


return p
return p

Latest revision as of 16:34, 12 February 2024

Documentation for this module may be created at Module:CreateButton/doc

local p = {} --p stands for package

function p.hello( frame )
    local wrapper = mw.html.create( 'html' )
	return tostring( wrapper )
end

return p