@Override
    public void writeAttribute(String name, Object value, String property) throws IOException {

        if ("nonce".equalsIgnoreCase(name) && value != null) {
            lastNonce = (String) value;
        }
        else if ("id".equalsIgnoreCase(name) && value != null) {
            lastId = (String) value;
        }

        String lowerCaseName = name.toLowerCase();
        if (lowerCaseName.startsWith("on") && DOM_EVENTS.contains(lowerCaseName)) {
            if (value != null) {
                if (lastEvents == null) {
                    lastEvents = new HashMap<>(1);
                }
                lastEvents.put(name, (String) value);
            }
            return;
        }

        getWrapped().writeAttribute(name, value, property);
    }
@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