On Fri Nov 22 16:09:59 2024 +0000, Jacek Caban wrote:
The ugly part of forwarding to `IHTMLDOMTextNode2` is that you need to implement `IHTMLDOMTextNode2` in an object that's not a text node (comment node). With a private interface, we could give it a proper set of properties, so no hooks would be needed, and just forward to it from both `IHTMLDOMTextNode*` and `IHTMLCommentElement*` interfaces. We could even share its entire implementation with something like:
struct HTMLCharacterData { IHTMLCharacterData IHTMLCharacterData_iface; DispatchEx *dispex; // used to forward IDispatch to comment's or text node's dispex nsIDOMCharacterData *character_data; // used for the actual implementation };
You could then embed it both in both comment and text node structs and just use the single `IHTMLCharacterData` implementation.
What about just using `IHTMLCommentElement2` for CharacterData's interface, since it exposes the exact same props that it has? I mean instead of the custom interface.