Module:frame: Difference between revisions

From Linguifex
Jump to navigation Jump to search
(Created page with "local export = {} local frame local function get_frame() frame = mw.getCurrentFrame():newChild{} return frame end function export.callParserFunction(...) return (frame or get_frame()):callParserFunction(...) end function export.expandTemplate(...) return (frame or get_frame()):expandTemplate(...) end function export.extensionTag(...) return (frame or get_frame()):extensionTag(...) end function export.newParserValue(...) return (frame or get_frame()):newParserV...")
m (1 revision imported)
 

Latest revision as of 17:47, 4 November 2025

Documentation for this module may be created at Module:frame/doc

local export = {}

local frame
local function get_frame()
	frame = mw.getCurrentFrame():newChild{}
	return frame
end

function export.callParserFunction(...)
	return (frame or get_frame()):callParserFunction(...)
end

function export.expandTemplate(...)
	return (frame or get_frame()):expandTemplate(...)
end

function export.extensionTag(...)
	return (frame or get_frame()):extensionTag(...)
end

function export.newParserValue(...)
	return (frame or get_frame()):newParserValue(...)
end

function export.newTemplateParserValue(...)
	return (frame or get_frame()):newTemplateParserValue(...)
end

function export.preprocess(...)
	return (frame or get_frame()):preprocess(...)
end

return export