[BUG #7325] wrap JS code in map, to reduce ns pollution