An effect system and FRP runtime for JavaScript