Skip to content

Instantly share code, notes, and snippets.

@e-jigsaw
Created December 29, 2014 05:21
Show Gist options
  • Save e-jigsaw/9db07d7ab71f96c54629 to your computer and use it in GitHub Desktop.
Save e-jigsaw/9db07d7ab71f96c54629 to your computer and use it in GitHub Desktop.
doctype html
html
head
meta(charset='utf-8')
body
h1 child!!
script(src='index.js', type='text/javascript')
href1 = if parent != window then document.referrer else document.location.href
try
href2 = parent.location.href
catch err
href2 = document.referrer
console.log href1, href2
# => localhost, localhost
doctype html
html
head
meta(charset='utf-8')
title iframe
link(href='index.css', rel='stylesheet', type='text/css')
body
h1 iframe
iframe(src='http://***.ngrok.com/child.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment