Consider using the new progressiveEnhancement API here - manual manipulation of the staticEnvironment should now be deprecated