implement window.frames

Fixes #3185