Skip to content

Commit 60ddc6e

Browse files
committed
Update methods for link/script additions
1 parent 5ea6f11 commit 60ddc6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ def add_css_link(self, css_link):
714714
'''link.rel = "stylesheet"; '''
715715
'''link.type = "text/css"; '''
716716
'''link.href = "%s"; '''
717+
'''link.crossorigin = "anonymous"; '''
717718
'''document.getElementsByTagName("head")[0]'''
718719
'''.appendChild(link);''')
719720
self.execute_script(add_css_link_script % css_link)
@@ -722,6 +723,8 @@ def add_js_link(self, js_link):
722723
script_to_add_js = (
723724
'''var script = document.createElement("script"); '''
724725
'''script.src = "%s"; '''
726+
'''script.defer; '''
727+
'''script.crossorigin = "anonymous"; '''
725728
'''document.getElementsByTagName("head")[0]'''
726729
'''.appendChild(script);''')
727730
self.execute_script(script_to_add_js % js_link)

0 commit comments

Comments
 (0)