Extending DOMNode

What now?

You can archieve the same goal with using the proxy pattern and building a proxy class, which keeps the reference to the DOM and also includes the functionality you want.