Skip to content

The Advent of N-API

Choose a tag to compare

@raub raub released this 24 Sep 12:00
· 74 commits to master since this release

API CHANGES:

  • In QML, use eventEmit(...) instead of cb.call(...).
  • qml.invoke(name, key, args) now takes args as an Array and passes positional arguments into the QML function. Also the key+args.length bundle is now a signature, so you should pass EXACTLY the number of arguments function expects.
  • Class Method, is now a callable, basically its instances arenow functions, and should be called as functions. Replace method.call(...) with method(...).
  • qml.invoke(name, key, [...]) and method.call(...) now expect JS values and convert them (to JSON strings) automatically.
  • qml.invoke(name, key, [...]) and method.call(...) now return values, as returned by QML.

Designed to work with Addon Tools 5. Moved GYP build step to subfolder.

Installation flow was changed.

Before: download sources, compile, remove unnecessary intermediates.
Now: download N-API binary from a Github/other release.