jsdom / webidl2js

Auto-generate JS class structures for Web IDL specifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate out "public API" utils from private ones

domenic opened this issue · comments

In particular, jsdom at least uses:

  • wrapperForImpl
  • implForWrapper
  • tryWrapperForImpl
  • tryImplForWrapper

But it imports these from the same generated utils.js file that also exports a bunch of other stuff, like mixin, implSymbol, iterInteralSymbol, etc.

Instead we should have something like webidl2js-utils.js (public API, those above) and webidl2js-wrapper-helpers.js (private API, the rest). Of course, webidl2js-wrapper-helpers.js can re-export the contents of webidl2js-utils.js so that the wrappers only have to import one file.

Then we can document the public ones.