Jacek Caban (@jacek) commented about dlls/mshtml/mutation.c:
- void *aElement, LONG aNameSpaceID, nsIAtom *aAttribute, LONG aModType, const nsAttrValue *aOldValue) + /*mozilla::dom::Element*/ void *aElement, LONG aNameSpaceID, nsIAtom *aAttribute, LONG aModType, const nsAttrValue *aOldValue) { + HTMLDocumentNode *This = impl_from_nsIDocumentObserver(iface); + nsIDOMElement *nselem = NULL; + nsIContent *nselem_node; + nsresult nsres; + + TRACE("%p, %p, %p\n", iface, This->dom_document, aElement); + + if (aElement) + { + nselem_node = (nsIContent *)aElement; + nsres = nsIContent_QueryInterface(nselem_node, &IID_nsIDOMElement, (void **)&nselem); + if(NS_SUCCEEDED(nsres) && nselem) + check_event_attr(This, nselem); `check_event_attr` is not exactly what we need here. It iterates over all attributes, so it would recreate and replace existing non-related event handlers. We'd probably want to factor out handling of a single attribute from it instead. You may get the name of the changed attribute from `nsIAtom` passed to `AttributeChanged` with `ScriptableToString` and the [attached](/uploads/4927195f5b520b7aceef83ab39a89d24/nsiatom.diff) `nsIAtom` declaration.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8586#note_110174