A Generative Approach to the Implementation of Language Bindings for the Document Object Model