Jump to content

Module:Entrypoint/doc

විකිපීඩියා වෙතින්
14:48, 29 මාර්තු 2025 වන විට IDB.S (සාකච්ඡාව | දායකත්ව) (Create) විසින් සිදු කර ඇති සංශෝධන
(වෙනස) ← පැරණි සංශෝධනය | වත්මන් සංශෝධනය (වෙනස) | නව සංශෝධනය → (වෙනස)

Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.

Documentation

Package function

entrypoint(package) (function)
Entrypoint templating wrapper for Scribunto packages.
Parameter: package Scribunto package. (table)
Errors:
'you must specify a function to call' (string; line 85)
'the function you specified did not exist' (string; line 91)
'$2 is not a function' (string; line 95; optional)
Returns: Template entrypoint - main. (function)

Other items

main(frame) (function)
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)

Notes

  • Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
  • As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.

"https://si.wikipedia.org/w/index.php?title=Module:Entrypoint/doc&oldid=738816" වෙතින් සම්ප්‍රවේශනය කෙරිණි