MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / executeJavaScript

Method executeJavaScript

src/main/java/org/htmlunit/html/HtmlPage.java:922–924  ·  view source on GitHub ↗

Executes the specified JavaScript code within the page. The usage would be similar to what can be achieved to execute JavaScript in the current page by entering "javascript:...some JS code..." in the URL field of a native browser. Note: the provided code won't be executed if JavaScr

(final String sourceCode)

Source from the content-addressed store, hash-verified

920 * the previous page) and a JavaScript result object
921 */
922 public ScriptResult executeJavaScript(final String sourceCode) {
923 return executeJavaScript(sourceCode, "injected script", 1);
924 }
925
926 /**
927 * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br>

Callers 15

setHashAboutBlankMethod · 0.95
printCssMediaRuleMethod · 0.95
formSubmitMethod · 0.95
formSubmit_targetMethod · 0.95
fixedInHtmlUnitMethod · 0.95
emptySubStringChangedMethod · 0.95
runSanityCheckMethod · 0.95

Calls 12

trimMethod · 0.80
substringMethod · 0.80
getParentScopeMethod · 0.80
getJavaScriptEngineMethod · 0.80
getWebClientMethod · 0.65
lengthMethod · 0.65
getScriptableObjectMethod · 0.65
getEnclosingWindowMethod · 0.65
executeMethod · 0.65
isJavaScriptEnabledMethod · 0.45
startsWithIgnoreCaseMethod · 0.45
startsWithMethod · 0.45

Tested by 15

setHashAboutBlankMethod · 0.76
printCssMediaRuleMethod · 0.76
formSubmitMethod · 0.76
formSubmit_targetMethod · 0.76
fixedInHtmlUnitMethod · 0.76
emptySubStringChangedMethod · 0.76
printHandlerMethod · 0.64