wm: use hash_map in js_helper