OnElementDestroy: Difference between revisions

no edit summary
(Added JavaScript example)
No edit summary
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = onElementDestroy
|side = shared
|type = event
|type = event
|name = onElementDestroy
|games = iii vc sa iv
|usage = an element is destroyed
|desc = an element is destroyed
|callbackParameters = Event event, Element element
|arg1 = Element element The element that is about to be destroyed.
|parameter1 = Element element The element that is about to be destroyed.
|cancel = true
|cancellable = true
|exampleJS = addEventHandler('OnElementDestroy', (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)
6,834

edits