This module contains helper functions for dealing with frame objects.
Documentation
Package items
frameTools.copy(frame)(function)- Frame methods are protected by a
checkSelffunction, which makes them more difficult to copy. - Parameter:
frameThe frame of pseudo-frame to copy. (Frame|PseudoFrame) - Returns: (PseudoFrame)
frameTools.preprocessMock()(function)- Stub of the
Frame:preprocessmethod that stringifies text or a Lua table. - Parameter: (Frame|PseudoFrame)
- Returns: (string)
frameTools.extensionTagMock()(function)- Stub of the
Frame:extensionTagmethod - returns a MediaWiki extension tag. - Parameter: (Frame|PseudoFrame)
- Returns: (string)
frameTools.expandTemplateMock()(function)- Mock of the
Frame:expandTemplatemethod that generates the text of template call. - Parameter: (Frame|PseudoFrame)
- Returns: (string)
frameTools.makePseudoFrame(frame, parentArgs, childArgs)(function)- Creates a pseudo frame with some useful functions available in mw:Extension:Scribunto, e. g.
newChild. - Parameters:
- Returns: The new pseudo-Frame (PseudoFrame)
frameTools.removeArgs(frame, ...)(function)- Returns a frame-like object with the given arguments removed.
- Parameters:
frameThe Frame to copy (Frame|PseudoFrame)...The arguments to omit from the newFrame'sargsproperty (optional)
- Returns: (PseudoFrame)
PseudoFrame
A frame-like object that provides mock implementations for the most common mw. frame instance methods and properties