Rejigging the JS context init to update or define, rather than just define.