InsertAction
MMO.core.history · 1 symbol · generated 5 Oct 2026
InsertAction
history.js:149- Namespace
MMO.core.history- Extends
- Action
Index
| constructor(target, api, doFn, undoFn, data) | ||
| execute() async | Create the entity, then run the local action with the id the server assigned it. | |
| undo() async | Delete the entity that was created, then roll the local action back. |
Methods3
constructor(target, api, doFn, undoFn, data)
history.js:150| target | ||
| api | ||
| doFn | ||
| undoFn | ||
| data |
execute()
asynchistory.js:161Create the entity, then run the local action with the id the server assigned it.
| returns | Promise<boolean> | false when the action had already run |
| throws | server's error when it refused the insert |
undo()
asynchistory.js:178Delete the entity that was created, then roll the local action back.
| returns | Promise<boolean> | false when the action was not in effect |
| throws | server's error when it refused the delete |