FWIW, Firefox has supported something along those lines for a long time, through XPCOM. A little over a year ago, I implemented something slightly more modern for WebIDL in Firefox.
Our approach, and I believe the approach described in these slides, is too heavyweight for things like elements that need to be very high performance, but it is useful for a lot of things.