Exemple #1
0
def local_script(path):
    with open(path) as f:
        code = f.read()
    return script()(code)
Exemple #2
0
def remote_script(url):
    return script(src=url)
Exemple #3
0
 def test_script_tag(self):
     dom = script(language="javascript")("console.log('omg!')")
     self.assertEqual(str(dom), normalize_whitespace('''
         <script language="javascript">console.log('omg!')</script>
     '''))