browser-based JS example