A quick search on Google shows that David Walsh has already worked out a very elegant script that approximates this. My own idea would be to not use a “flashlight” effect, but a “frosted window” effect using moveable, translucent PNG layers (rather than a background) that retains basic shapes, features, and colors, but obscures microfeatures–i.e. the graphemes–of text. Here’s one mock-up to illustrate the idea:
Now there are a number of obvious problems with this idea in research practice–the obfuscation may significantly alter the layout and (potentially distracting) elements of the page; it may negatively affect users ability to gauge document length and position; it wouldn’t necessary reflect normal reading behavior; and, of course, it could be terribly annoying to the reader, etc. That’s just off the top of my head; if you have more ideas, please share.