whether e10s is enabled or not is a browser setting that’s not under my control, isn’t it?
I also cannot programmatically detect it?
I’m pretty sure that there is no API for it, there may be some bugs you can detect that only occur whis e10s enabled or disabled.
Where would I put this code, in the background script?
The code I posted would take longer if the load in the current process is high, so unless you want to detect the load in a content process, you’d run it in the background context.
Or are you suggesting that your code snippt will be slow exactly in those cases where e10s is not enabled?
Well. Unless you are doing stupid calculation in your background page, the code will not be slow if e10s is enabled. If it is not slow, you can’t conclude much more without running the additional API call test I suggested or asking the user whether e10s is enabled.