OnElementDestroy: Difference between revisions

Jump to navigation Jump to search
Added JavaScript example
No edit summary
 
(Added JavaScript example)
Line 7: Line 7:
|parameter1 = Element element The element that is about to be destroyed.
|parameter1 = Element element The element that is about to be destroyed.
|cancellable = true
|cancellable = true
|exampleLua = addEventHandler("OnElementDestroy", function(event,element)
|exampleJS = addEventHandler('OnElementDestroy', (event, element) => {
message("Element with id " .. element.id .. " has been destroyed.", COLOUR_RED)
message(`Element with id ${element.id} has been destroyed.`, COLOUR_RED)
});
|exampleLua = addEventHandler('OnElementDestroy', function(event, element)
message('Element with id ' .. element.id .. ' has been destroyed.', COLOUR_RED)
end)
end)
}}
}}
21

edits

Navigation menu