mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
16 lines
443 B
Python
16 lines
443 B
Python
import json
|
|
|
|
def main(request, response):
|
|
headers = [("Content-Type", "text/html")]
|
|
|
|
body = """
|
|
<!DOCTYPE html>
|
|
<script>
|
|
var data = %s;
|
|
if (window.opener)
|
|
window.opener.postMessage(data, "*");
|
|
if (window.top != window)
|
|
window.top.postMessage(data, "*");
|
|
</script>
|
|
""" % json.dumps(request.headers["sec-metadata"])
|
|
return headers, body
|