Note: To save server CPU, you should avoid setting theElement to the root element where possible. Using resourceRoot is usually sufficient if the event is handled by the same resource on the server.