File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -714,6 +714,7 @@ def add_css_link(self, css_link):
714
714
'''link.rel = "stylesheet"; '''
715
715
'''link.type = "text/css"; '''
716
716
'''link.href = "%s"; '''
717
+ '''link.crossorigin = "anonymous"; '''
717
718
'''document.getElementsByTagName("head")[0]'''
718
719
'''.appendChild(link);''' )
719
720
self .execute_script (add_css_link_script % css_link )
@@ -722,6 +723,8 @@ def add_js_link(self, js_link):
722
723
script_to_add_js = (
723
724
'''var script = document.createElement("script"); '''
724
725
'''script.src = "%s"; '''
726
+ '''script.defer; '''
727
+ '''script.crossorigin = "anonymous"; '''
725
728
'''document.getElementsByTagName("head")[0]'''
726
729
'''.appendChild(script);''' )
727
730
self .execute_script (script_to_add_js % js_link )
You can’t perform that action at this time.
0 commit comments