Module:Mw.html extension/doc

Usage
For all functions other than  all you need to do is simply require this module:

You can mix the normal old functions with the newly added ones.

attrIf
This accepts either a name-value pair or a table

cssIf
This accepts either a name-value pair or a table similar to

exec
The first parameter of the function will have the current state of the mw.html object passed into it, usually we call this parameter, the rest of the parameters can be anything you want. To not break the chaining the function must also return a mw.html object. Example:

This function can then be used as follows

addFunction
The function you want to add has to be of the same structure as in. Example:

tr, th and td
The following three tables are the same: