nodes often only have * a pointer (the id attribute) to its content, and is lint handler would * look up the DOM tree and invoke the default lint handler on that tree. * * FIXME: There is probably no reason for the lint handler to return anything. * The caller should simply proceed with the next sibling of $rootNode * after the lint handler returns. * * @param ParsoidExtensionAPI $extApi * @param DOMElement $rootNode Extension content's root node * @param callable $defaultHandler Default lint handler * - Default lint handler has signature $defaultHandler( DOMElement $elt ): void * @return DOMNode|null|false Return `false` to indicate that this * extension has no special lint handler (the default lint handler will * be used. Return `null` to indicate linting should proceed with the * next sibling. (Deprecated) A `DOMNode` can be returned to indicate * the point in the tree where linting should resume. */ public function lintHandler( ParsoidExtensionAPI $extApi, DOMElement $rootNode, callable $defaultHandler ) { /* Use default linter */ return false; } /** * Serialize a DOM node created by this extension to wikitext. * @param ParsoidExtensionAPI $extApi * @param DOMElement $node * @param bool $wrapperUnmodified * @return string|false Return false to use the default serialization. */ public function domToWikitext( ParsoidExtensionAPI $extApi, DOMElement $node, bool $wrapperUnmodified ) { /* Use default serialization */ return false; } /** * Some extensions require the ability to modify the argument * dictionary. * @param ParsoidExtensionApi $extApi * @param object $argDict */ public function modifyArgDict( ParsoidExtensionAPI $extApi, object $argDict ): void { /* do not modify the argument dictionary by default */ } }