webidl2js icon indicating copy to clipboard operation
webidl2js copied to clipboard

Add `webidl2js‑globals.js` to automate install of `[Exposed]` globals

Open ExE-Boss opened this issue 5 years ago • 4 comments

TODO:

  • [x] Fix the interface order determination algorithm so that Element goes after Node and EventTarget, but before HTMLElement.
  • [ ] Improve the efficiency of the interface order determination algorithm.

Depends on:


Supersedes and closes https://github.com/jsdom/webidl2js/pull/101.

review?(@TimothyGu)

ExE-Boss avatar Apr 03 '20 21:04 ExE-Boss

Perhaps we can be a bit less ambitious, and separate out the parts that add [Exposed] support to install() (which I mentioned in #191) from the parts that aggregates globals into the same file? This way we could immediately start using it in jsdom.

WRT an algorithm to figure out the require order, if the dependency graph turns out to be acyclic then topological sorting should work. If it is cyclic then… we’d have to look into other things.

TimothyGu avatar Apr 04 '20 14:04 TimothyGu

I've rebased this, but it doesn't look like it's ready for review yet? Interface files call webidl2jsGlobal.setupGlobal but it's not defined.

TimothyGu avatar Apr 06 '20 17:04 TimothyGu

@TimothyGu That’s a leftover from before I renamed it to just installInterfaces, which is more descriptive of what it does.

ExE-Boss avatar Apr 08 '20 15:04 ExE-Boss