@Override
    public void endElement(String name) throws IOException {
        listenOnEndAttribute();

        if ("body".equalsIgnoreCase(name)) {
            writeJavascriptHandlers();
        }

        getWrapped().endElement(name);
    }
@see <a href="https://www.w3schools.com/jsref/dom_obj_event.asp">List of all HTML DOM Events</a>
primefaces/src/main/java/org/primefaces/csp/CspResponseWriter.java