api: js: support native calls redefine