View source for Module:Mw.html extension
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- <nowiki>
local p = {}
local checkType = require( 'libraryUtil' ).checkType
local mwHtml = getmetatable( mw.html.create() ).__index -- Trick to get acces to the mw.html class
local stack = {} -- Used to keep track of nested IF-END tags
local noOp = {} -- This object is returned by IF(false) tag
function mwHtml:addClassIf( cond, class )
if cond then
return self:addClass( class )
else
return self
end
end
function mwHtml:tagIf( cond, tagname )
if cond then
return self:tag( tagname )
else
return self
000
1:0
Template used on this page:
Return to Module:Mw.html extension.