Igalia / acacia

Library for inspecting accessibility APIs
https://igalia.github.io/acacia
GNU Lesser General Public License v2.1
8 stars 1 forks source link

Create NodeJS bindings for IA2 #123

Closed spectranaut closed 8 months ago

spectranaut commented 8 months ago

One change to note in particular: after this lands, windows code will no longer compile with the default windows generator. This is because trying to write CMAKE for a multi-configuration generator ended up being too difficult/finicky for me. Now you have to download/use ninja, which seems fine, because that is what we use on mac. Maybe we should use on all three to be consistent at some point.

spectranaut commented 8 months ago

@joanmarie, this is back to draft, please don't review tomorrow. A few things that you add -- that work in python -- don't seem to work in nodejs. I'll investigate/fix then ping you for review :)

spectranaut commented 8 months ago

Ok Joanie!

Two things:

  1. I thought arrays didn't work in javascript, they do, just not as a native array. I updated the README.
  2. I tested the group position struct without the extra directives you added to the ia2_inspect.i file, and it works! In python and in node. Which is great, because I was reading the SWIG documentation before trying it, and it seemed like it should.

When working on the linux version of this, if there is a list and it is simply a list of states, I guess we should just return a string for now. I'll revert the work you did to make the GetStates() return arrays instead of strings. If there is another option to return a space separated string instead of a list, I suppose we should go for that for now.