Open this page in the API Guide

ScriptEditor.subscribeFocused Method