Content deleted Content added
Line 137:
</pre>
In general you should precompute as much as possible to avoid unnecessary computations inside the loop, like this
<source lang="Lua">
my_object = {};
my_object.hello = function( frame )
local str = "Hello World!"
return str
end
my_object.frame = mw.getCurrentFrame()
my_object.wrap = function ()
return my_object.hello(my_object.frame)
end
return my_object
</source>
===Testing in a sandboxed environment===
|