          If |scriptOrModule| is non-null:
          <ol>
            <li>Let <var>script</var> be the <dfn data-cite="HTML5#concept-script">script</dfn> obtained from <var>scriptOrModule</var>.[[\HostDefined]].</li>
            <li>Let <var>resourceString</var> be equal to the <dfn data-cite="HTML5#concept-script-base-url">base URL</dfn> of <var>script</var>.</li>
            <li>Set <a>ProfilerFrame.resourceId</a> to the result of running <a>get an element ID</a> on <var>resourceString</var> and <a>Profil