I’m guessing you’re not really testing for a web interpreter so much as testing for a particular type of rendering capability? Lectrote, for example, is just a web interpreter packaged up as a local application, so anything Parchment can do, Lectrote should be able to do too.
Unfortunately, while there are plenty of ways to test for particular rendering capabilities, there’s currently no way to test the size of the entire screen in pixels, which I’m guessing is what you want. I put forward a tentative proposal last year but it hasn’t ended up going anywhere yet.
It may be possible to get the size of the whole screen in pixels by calling glk_window_get_size on the root window, but I can’t find where (or if!) it’s defined what units that function should use on pair windows. It may be illegal, or it might be undefined behavior, or it might use the pair’s key window’s units.
It should be possible to get the size of the whole screen in pixels by closing all existing windows, opening a single graphics window that takes up the whole screen, measuring it, then undoing that whole mess. But in the process this will erase anything that was printed to the screen, so it should only be done at startup…which means these values will be wrong if a game is saved on one platform and restored on another.
You can get around that by @protecting these values from restoration, but things are rapidly getting out of hand here, and if there’s any simpler solution you should prefer it over this!
Still, if you don’t mind these values being wrong if a game is saved on one device and restored on another, an extension could hook into the “starting the virtual machine” rules to capture these values before Inform starts up properly.