Module:Sprite: Difference between revisions

Change of plans
(It seems this is needed)
(Change of plans)
Line 85: Line 85:
end
end


function Sprite:GenerateHTML ()
function Sprite:GenerateHTML (html)
local sprite = mw.html.create( 'div' ):addClass( 'sprite' )
if html then
 
local sprite = html.tag("div")
else
local sprite = mw.html.create("div")
end
sprite:addClass("sprite")


local source = self.__source
local source = self.__source
Line 97: Line 102:
end
end


sprite:cssText( table.concat( styles, '; ' ) )
sprite:cssText( table.concat( styles, "; " ) )


return tostring(sprite)
return sprite
end
end


return Sprite
return Sprite
Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator, Widget editors
154

edits