MCPcopy Index your code
hub / github.com/RustPython/RustPython / js_output

Method js_output

Lib/http/cookies.py:380–388  ·  view source on GitHub ↗
(self, attrs=None)

Source from the content-addressed store, hash-verified

378 return '<%s: %s>' % (self.__class__.__name__, self.OutputString())
379
380 def js_output(self, attrs=None):
381 # Print javascript
382 return """
383 <script type="text/javascript">
384 <!-- begin hiding
385 document.cookie = \"%s\";
386 // end hiding -->
387 </script>
388 """ % (self.OutputString(attrs).replace('"', r'\"&#x27;))
389
390 def OutputString(self, attrs=None):
391 # Build up our result

Callers 4

test_setterMethod · 0.95
js_outputMethod · 0.45
test_loadMethod · 0.45
test_quoted_metaMethod · 0.45

Calls 2

OutputStringMethod · 0.95
replaceMethod · 0.45

Tested by 3

test_setterMethod · 0.76
test_loadMethod · 0.36
test_quoted_metaMethod · 0.36