No. Context availability in Lightweight templates does not depend on the encapsulation type. All context objects are available even when the encapsulation type is iframe. The context... construction is always available when writing JavaScript code in the JS tab of the template editor, regardless of whether the template uses Shadow DOM, iframe, or any other encapsulation.