Control libeio from JavaScript