Lightweight bridge between JavaScript and native applications