Jacek Caban (@jacek) commented about dlls/mshtml/mutation.c:
+*/ static void NSAPI nsDocumentObserver_AttributeChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, - 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); You may just treat it as `nsISupports`, like:
nsres = nsISupports_QueryInterface(aElement, &IID_nsIDOMElement, (void **)&nselem);
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8586#note_110173