Add preliminary support for same-origin iframes

This commit is contained in:
MoyuScript
2014-09-16 20:12:13 +03:00
parent 5a282666dc
commit a4ee26cffd
10 changed files with 119 additions and 23 deletions

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>frame 1</title>
<style>
body {
background: green;
color: red;
}
</style>
</head>
<body>
this is the content of frame1
</body>
</html>

View File

@ -5,6 +5,6 @@
<script type="text/javascript" src="../test.js"></script>
</head>
<body>
<iframe src="http://experiments.hertzen.com/csstree/" width="500"></iframe>
<iframe src="/tests/assets/iframe/frame1.html" width="500" height="500"></iframe>
</body>
</html>
</html>

View File

@ -12,7 +12,7 @@ var h2cSelector, h2cOptions;
}
var sources = ['log', 'punycode/punycode', 'core', 'nodecontainer', 'stackingcontext', 'textcontainer', 'support', 'imagecontainer', 'dummyimagecontainer', 'proxyimagecontainer', 'gradientcontainer',
'lineargradientcontainer', 'webkitgradientcontainer', 'svgcontainer', 'svgnodecontainer', 'imageloader', 'nodeparser', 'font', 'fontmetrics', 'renderer', 'promise', 'xhr', 'renderers/canvas'];
'lineargradientcontainer', 'webkitgradientcontainer', 'svgcontainer', 'svgnodecontainer', 'imageloader', 'nodeparser', 'font', 'fontmetrics', 'renderer', 'promise', 'xhr', 'framecontainer', 'renderers/canvas'];
['/tests/assets/jquery-1.6.2'].concat(window.location.search === "?selenium" ? ['/dist/html2canvas'] : sources.map(function(src) { return '/src/' + src; })).forEach(appendScript);