PageState CS→JS

Specs unchanged, all passes.