| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <title>Interface IJavaScriptEngine </title> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <meta name="title" content="Interface IJavaScriptEngine "> |
| |
| <meta name="description" content="Defines an interface allowing the user to manage settings in the browser's JavaScript engine."> |
| <link rel="icon" href="../images/favicon.ico"> |
| <link rel="stylesheet" href="../public/docfx.min.css"> |
| <link rel="stylesheet" href="../public/main.css"> |
| <meta name="docfx:navrel" content="../toc.html"> |
| <meta name="docfx:tocrel" content="toc.html"> |
| |
| <meta name="docfx:rel" content="../"> |
| |
| |
| <meta name="docfx:docurl" content="https://github.com/SeleniumHQ/selenium/new/trunk/apiSpec/new?filename=OpenQA_Selenium_IJavaScriptEngine.md&value=---%0Auid%3A%20OpenQA.Selenium.IJavaScriptEngine%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A"> |
| <meta name="loc:inThisArticle" content="In this article"> |
| <meta name="loc:searchResultsCount" content="{count} results for "{query}""> |
| <meta name="loc:searchNoResults" content="No results for "{query}""> |
| <meta name="loc:tocFilter" content="Filter by title"> |
| <meta name="loc:nextArticle" content="Next"> |
| <meta name="loc:prevArticle" content="Previous"> |
| <meta name="loc:themeLight" content="Light"> |
| <meta name="loc:themeDark" content="Dark"> |
| <meta name="loc:themeAuto" content="Auto"> |
| <meta name="loc:changeTheme" content="Change theme"> |
| <meta name="loc:copy" content="Copy"> |
| <meta name="loc:downloadPdf" content="Download PDF"> |
| |
| <script type="module" src="./../public/docfx.min.js"></script> |
| |
| <script> |
| const theme = localStorage.getItem('theme') || 'auto' |
| document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme) |
| </script> |
| |
| </head> |
| |
| <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference"> |
| <header class="bg-body border-bottom"> |
| <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation"> |
| <div class="container-xxl flex-nowrap"> |
| <a class="navbar-brand" href="../index.html"> |
| <img id="logo" class="svg" src="../images/logo.svg" alt="Selenium .NET API"> |
| Selenium .NET API |
| </a> |
| <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation"> |
| <i class="bi bi-three-dots"></i> |
| </button> |
| <div class="collapse navbar-collapse" id="navpanel"> |
| <div id="navbar"> |
| <form class="search" role="search" id="search"> |
| <i class="bi bi-search"></i> |
| <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search"> |
| </form> |
| </div> |
| </div> |
| </div> |
| </nav> |
| </header> |
| |
| <main class="container-xxl"> |
| <div class="toc-offcanvas"> |
| <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel"> |
| <div class="offcanvas-header"> |
| <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5> |
| <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button> |
| </div> |
| <div class="offcanvas-body"> |
| <nav class="toc" id="toc"></nav> |
| </div> |
| </div> |
| </div> |
| |
| <div class="content"> |
| <div class="actionbar"> |
| <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents"> |
| <i class="bi bi-list"></i> |
| </button> |
| |
| <nav id="breadcrumb"></nav> |
| </div> |
| |
| <article data-uid="OpenQA.Selenium.IJavaScriptEngine"> |
| |
| |
| |
| <h1 id="OpenQA_Selenium_IJavaScriptEngine" data-uid="OpenQA.Selenium.IJavaScriptEngine" class="text-break"> |
| Interface IJavaScriptEngine <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L29"><i class="bi bi-code-slash"></i></a> |
| </h1> |
| |
| <div class="facts text-secondary"> |
| <dl><dt>Namespace</dt><dd><a class="xref" href="OpenQA.html">OpenQA</a>.<a class="xref" href="OpenQA.Selenium.html">Selenium</a></dd></dl> |
| <dl><dt>Assembly</dt><dd>WebDriver.dll</dd></dl> |
| </div> |
| |
| <div class="markdown summary"><p>Defines an interface allowing the user to manage settings in the browser's JavaScript engine.</p> |
| </div> |
| <div class="markdown conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public interface IJavaScriptEngine : IDisposable</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| <dl class="typelist inheritedMembers"> |
| <dt>Inherited Members</dt> |
| <dd> |
| <div> |
| <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable.dispose">IDisposable.Dispose()</a> |
| </div> |
| </dd></dl> |
| |
| |
| |
| |
| |
| |
| <h2 class="section" id="properties">Properties |
| </h2> |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_InitializationScripts_" data-uid="OpenQA.Selenium.IJavaScriptEngine.InitializationScripts*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_InitializationScripts" data-uid="OpenQA.Selenium.IJavaScriptEngine.InitializationScripts"> |
| InitializationScripts |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L54"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Gets the read-only list of initialization scripts added for this JavaScript engine.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">IReadOnlyList<InitializationScript> InitializationScripts { get; }</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| <h4 class="section">Property Value</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a><<a class="xref" href="OpenQA.Selenium.InitializationScript.html">InitializationScript</a>></dt> |
| <dd></dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_ScriptCallbackBindings_" data-uid="OpenQA.Selenium.IJavaScriptEngine.ScriptCallbackBindings*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_ScriptCallbackBindings" data-uid="OpenQA.Selenium.IJavaScriptEngine.ScriptCallbackBindings"> |
| ScriptCallbackBindings |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L59"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Gets the read-only list of binding callbacks added for this JavaScript engine.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">IReadOnlyList<string> ScriptCallbackBindings { get; }</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| <h4 class="section">Property Value</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt> |
| <dd></dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h2 class="section" id="methods">Methods |
| </h2> |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_AddInitializationScript_" data-uid="OpenQA.Selenium.IJavaScriptEngine.AddInitializationScript*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_AddInitializationScript_System_String_System_String_" data-uid="OpenQA.Selenium.IJavaScriptEngine.AddInitializationScript(System.String,System.String)"> |
| AddInitializationScript(string, string) |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L91"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously adds JavaScript to be loaded on every document load.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task<InitializationScript> AddInitializationScript(string scriptName, string script)</code></pre> |
| </div> |
| |
| <h4 class="section">Parameters</h4> |
| <dl class="parameters"> |
| <dt><code>scriptName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt> |
| <dd><p>The friendly name by which to refer to this initialization script.</p> |
| </dd> |
| <dt><code>script</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt> |
| <dd><p>The JavaScript to be loaded on every page.</p> |
| </dd> |
| </dl> |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a><<a class="xref" href="OpenQA.Selenium.InitializationScript.html">InitializationScript</a>></dt> |
| <dd><p>A task containing an <a class="xref" href="OpenQA.Selenium.InitializationScript.html">InitializationScript</a> object representing the script to be loaded on each page.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Exceptions</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt> |
| <dd><p>If <code class="paramref">scriptName</code> or <code class="paramref">script</code> are <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_AddScriptCallbackBinding_" data-uid="OpenQA.Selenium.IJavaScriptEngine.AddScriptCallbackBinding*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_AddScriptCallbackBinding_System_String_" data-uid="OpenQA.Selenium.IJavaScriptEngine.AddScriptCallbackBinding(System.String)"> |
| AddScriptCallbackBinding(string) |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L134"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously adds a binding to a callback method that will raise |
| an event when the named binding is called by JavaScript executing |
| in the browser.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task AddScriptCallbackBinding(string bindingName)</code></pre> |
| </div> |
| |
| <h4 class="section">Parameters</h4> |
| <dl class="parameters"> |
| <dt><code>bindingName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt> |
| <dd><p>The name of the callback that will trigger events when called by JavaScript executing in the browser.</p> |
| </dd> |
| </dl> |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Exceptions</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt> |
| <dd><p>If <code class="paramref">bindingName</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p> |
| </dd> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt> |
| <dd><p>If A binding with the specified name already exists.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_ClearAll_" data-uid="OpenQA.Selenium.IJavaScriptEngine.ClearAll*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_ClearAll" data-uid="OpenQA.Selenium.IJavaScriptEngine.ClearAll"> |
| ClearAll() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L155"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously removes all bindings to JavaScript callbacks and all |
| initialization scripts from being loaded for each document.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task ClearAll()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_ClearInitializationScripts_" data-uid="OpenQA.Selenium.IJavaScriptEngine.ClearInitializationScripts*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_ClearInitializationScripts" data-uid="OpenQA.Selenium.IJavaScriptEngine.ClearInitializationScripts"> |
| ClearInitializationScripts() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L106"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously removes all initialization scripts from being |
| loaded on every document load.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task ClearInitializationScripts()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_ClearScriptCallbackBindings_" data-uid="OpenQA.Selenium.IJavaScriptEngine.ClearScriptCallbackBindings*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_ClearScriptCallbackBindings" data-uid="OpenQA.Selenium.IJavaScriptEngine.ClearScriptCallbackBindings"> |
| ClearScriptCallbackBindings() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L148"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously removes all bindings to JavaScript callbacks.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task ClearScriptCallbackBindings()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_DisableDomMutationMonitoring_" data-uid="OpenQA.Selenium.IJavaScriptEngine.DisableDomMutationMonitoring*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_DisableDomMutationMonitoring" data-uid="OpenQA.Selenium.IJavaScriptEngine.DisableDomMutationMonitoring"> |
| DisableDomMutationMonitoring() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L82"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Disables monitoring for DOM changes.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task DisableDomMutationMonitoring()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_EnableDomMutationMonitoring_" data-uid="OpenQA.Selenium.IJavaScriptEngine.EnableDomMutationMonitoring*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_EnableDomMutationMonitoring" data-uid="OpenQA.Selenium.IJavaScriptEngine.EnableDomMutationMonitoring"> |
| EnableDomMutationMonitoring() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L76"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Enables monitoring for DOM changes.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task EnableDomMutationMonitoring()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_PinScript_" data-uid="OpenQA.Selenium.IJavaScriptEngine.PinScript*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_PinScript_System_String_" data-uid="OpenQA.Selenium.IJavaScriptEngine.PinScript(System.String)"> |
| PinScript(string) |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L115"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Pins a JavaScript snippet for execution in the browser without transmitting the |
| entire script across the wire for every execution.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task<PinnedScript> PinScript(string script)</code></pre> |
| </div> |
| |
| <h4 class="section">Parameters</h4> |
| <dl class="parameters"> |
| <dt><code>script</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt> |
| <dd><p>The JavaScript to pin</p> |
| </dd> |
| </dl> |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a><<a class="xref" href="OpenQA.Selenium.PinnedScript.html">PinnedScript</a>></dt> |
| <dd><p>A task containing a <a class="xref" href="OpenQA.Selenium.PinnedScript.html">PinnedScript</a> object to use to execute the script.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Exceptions</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt> |
| <dd><p>If <code class="paramref">script</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_RemoveInitializationScript_" data-uid="OpenQA.Selenium.IJavaScriptEngine.RemoveInitializationScript*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_RemoveInitializationScript_System_String_" data-uid="OpenQA.Selenium.IJavaScriptEngine.RemoveInitializationScript(System.String)"> |
| RemoveInitializationScript(string) |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L99"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously removes JavaScript from being loaded on every document load.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task RemoveInitializationScript(string scriptName)</code></pre> |
| </div> |
| |
| <h4 class="section">Parameters</h4> |
| <dl class="parameters"> |
| <dt><code>scriptName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt> |
| <dd><p>The friendly name of the initialization script to be removed.</p> |
| </dd> |
| </dl> |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Exceptions</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt> |
| <dd><p>If <code class="paramref">scriptName</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_RemoveScriptCallbackBinding_" data-uid="OpenQA.Selenium.IJavaScriptEngine.RemoveScriptCallbackBinding*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_RemoveScriptCallbackBinding_System_String_" data-uid="OpenQA.Selenium.IJavaScriptEngine.RemoveScriptCallbackBinding(System.String)"> |
| RemoveScriptCallbackBinding(string) |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L142"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously removes a binding to a JavaScript callback.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task RemoveScriptCallbackBinding(string bindingName)</code></pre> |
| </div> |
| |
| <h4 class="section">Parameters</h4> |
| <dl class="parameters"> |
| <dt><code>bindingName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt> |
| <dd><p>The name of the callback to be removed.</p> |
| </dd> |
| </dl> |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Exceptions</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt> |
| <dd><p>If <code class="paramref">bindingName</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_Reset_" data-uid="OpenQA.Selenium.IJavaScriptEngine.Reset*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_Reset" data-uid="OpenQA.Selenium.IJavaScriptEngine.Reset"> |
| Reset() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L163"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously removes all bindings to JavaScript callbacks, all |
| initialization scripts from being loaded for each document, and |
| stops listening for events.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task Reset()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_StartEventMonitoring_" data-uid="OpenQA.Selenium.IJavaScriptEngine.StartEventMonitoring*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_StartEventMonitoring" data-uid="OpenQA.Selenium.IJavaScriptEngine.StartEventMonitoring"> |
| StartEventMonitoring() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L65"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Asynchronously starts monitoring for events from the browser's JavaScript engine.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task StartEventMonitoring()</code></pre> |
| </div> |
| |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_StopEventMonitoring_" data-uid="OpenQA.Selenium.IJavaScriptEngine.StopEventMonitoring*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_StopEventMonitoring" data-uid="OpenQA.Selenium.IJavaScriptEngine.StopEventMonitoring"> |
| StopEventMonitoring() |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L70"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Stops monitoring for events from the browser's JavaScript engine.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">void StopEventMonitoring()</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a id="OpenQA_Selenium_IJavaScriptEngine_UnpinScript_" data-uid="OpenQA.Selenium.IJavaScriptEngine.UnpinScript*"></a> |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_UnpinScript_OpenQA_Selenium_PinnedScript_" data-uid="OpenQA.Selenium.IJavaScriptEngine.UnpinScript(OpenQA.Selenium.PinnedScript)"> |
| UnpinScript(PinnedScript) |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L123"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Unpins a previously pinned script from the browser.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">Task UnpinScript(PinnedScript script)</code></pre> |
| </div> |
| |
| <h4 class="section">Parameters</h4> |
| <dl class="parameters"> |
| <dt><code>script</code> <a class="xref" href="OpenQA.Selenium.PinnedScript.html">PinnedScript</a></dt> |
| <dd><p>The <a class="xref" href="OpenQA.Selenium.PinnedScript.html">PinnedScript</a> object to unpin.</p> |
| </dd> |
| </dl> |
| |
| <h4 class="section">Returns</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt> |
| <dd><p>A task that represents the asynchronous operation.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Exceptions</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt> |
| <dd><p>If <code class="paramref">script</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p> |
| </dd> |
| </dl> |
| |
| |
| |
| <h2 class="section" id="events">Events |
| </h2> |
| |
| |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_DomMutated" data-uid="OpenQA.Selenium.IJavaScriptEngine.DomMutated"> |
| DomMutated |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L49"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Occurs when a value of an attribute in an element is being changed.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">event EventHandler<DomMutatedEventArgs>? DomMutated</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Event Type</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.eventhandler-1">EventHandler</a><<a class="xref" href="OpenQA.Selenium.DomMutatedEventArgs.html">DomMutatedEventArgs</a>></dt> |
| <dd></dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_JavaScriptCallbackExecuted" data-uid="OpenQA.Selenium.IJavaScriptEngine.JavaScriptCallbackExecuted"> |
| JavaScriptCallbackExecuted |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L34"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Occurs when a JavaScript callback with a named binding is executed.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">event EventHandler<JavaScriptCallbackExecutedEventArgs>? JavaScriptCallbackExecuted</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Event Type</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.eventhandler-1">EventHandler</a><<a class="xref" href="OpenQA.Selenium.JavaScriptCallbackExecutedEventArgs.html">JavaScriptCallbackExecutedEventArgs</a>></dt> |
| <dd></dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_JavaScriptConsoleApiCalled" data-uid="OpenQA.Selenium.IJavaScriptEngine.JavaScriptConsoleApiCalled"> |
| JavaScriptConsoleApiCalled |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L44"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Occurs when methods on the JavaScript console are called.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">event EventHandler<JavaScriptConsoleApiCalledEventArgs>? JavaScriptConsoleApiCalled</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Event Type</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.eventhandler-1">EventHandler</a><<a class="xref" href="OpenQA.Selenium.JavaScriptConsoleApiCalledEventArgs.html">JavaScriptConsoleApiCalledEventArgs</a>></dt> |
| <dd></dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h3 id="OpenQA_Selenium_IJavaScriptEngine_JavaScriptExceptionThrown" data-uid="OpenQA.Selenium.IJavaScriptEngine.JavaScriptExceptionThrown"> |
| JavaScriptExceptionThrown |
| <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L39"><i class="bi bi-code-slash"></i></a> |
| </h3> |
| |
| <div class="markdown level1 summary"><p>Occurs when an exception is thrown by JavaScript being executed in the browser.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">event EventHandler<JavaScriptExceptionThrownEventArgs>? JavaScriptExceptionThrown</code></pre> |
| </div> |
| |
| |
| |
| |
| |
| |
| <h4 class="section">Event Type</h4> |
| <dl class="parameters"> |
| <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.eventhandler-1">EventHandler</a><<a class="xref" href="OpenQA.Selenium.JavaScriptExceptionThrownEventArgs.html">JavaScriptExceptionThrownEventArgs</a>></dt> |
| <dd></dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| </article> |
| |
| <div class="contribution d-print-none"> |
| <a href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/IJavaScriptEngine.cs/#L29" class="edit-link">Edit this page</a> |
| </div> |
| |
| |
| </div> |
| |
| <div class="affix"> |
| <nav id="affix"></nav> |
| </div> |
| </main> |
| |
| <div class="container-xxl search-results" id="search-results"></div> |
| |
| <footer class="border-top text-secondary"> |
| <div class="container-xxl"> |
| <div class="flex-fill"> |
| <span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span> |
| </div> |
| </div> |
| </footer> |
| </body> |
| </html> |