Skip to content

Commit 92186bb

Browse files
committed
Update default "onload" value for JS injector
1 parent 18688ee commit 92186bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ def add_js_link(self, js_link):
732732
script.src = "%s";
733733
script.defer;
734734
script.crossorigin = "anonymous";
735-
script.onload = function() {$("html")};
735+
script.onload = function() { null };
736736
head.appendChild(script);
737737
}
738738
injectJS();""")
@@ -755,7 +755,7 @@ def add_js_code_from_link(self, js_link):
755755
'''var h = document.getElementsByTagName('head').item(0);'''
756756
'''var s = document.createElement("script");'''
757757
'''s.type = "text/javascript";'''
758-
'''s.onload = function() {$("html")};'''
758+
'''s.onload = function() { null };'''
759759
'''s.appendChild(document.createTextNode("%s"));'''
760760
'''h.appendChild(s);''')
761761
self.execute_script(add_js_code_script % re.escape(js_code))

0 commit comments

Comments
 (0)