Changes between Version 2 and Version 3 of documentation/LuaManual/AttachingToEvents

Show
Ignore:
Author:
gambini (IP: 96.38.104.126)
Timestamp:
05/19/12 08:03:58 (5 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • documentation/LuaManual/AttachingToEvents

    v2 v3  
    4848The same rules for inline event scripts apply when a string is passed as the second argument.  
    4949 
    50 However, if a function is passed in, then there is one caveat. If the function requires one of the local variables (event,element,document), then that variable ''must'' be in the correct position in the parameters list. The order is the order in the previous sentence: ''event'' first, ''element'' second, ''document'' third. If you only need event, then you can have the function only take one argument. If you need only document, then you must have the other two parameter slots before the document parameter. And, because it is in Lua, they may have any name.  
     50However, if a function is passed in, then there is one caveat. If the function requires one of the local variables (event,element,document), then that variable ''must'' be in the correct position in the parameters list. The order is the order in the previous sentence: ''event'' first, ''element'' second, ''document'' third. If you only need ''event'', then you can have the function only take one argument. If you need only ''document'', then you must have the other two parameter slots before the document parameter. And, because it is in Lua, they may have any name.  
    5151 
    5252{{{