rendering mail content in 2nd sandboxed iframe works

This commit is contained in:
Tankred Hase 2013-06-05 18:02:07 +02:00
parent 32cc6b10e8
commit 4e6977fa1d
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,17 @@
(function() {
'use strict';
console.log('Mail content frame loaded');
// set listender
window.onmessage = function(e) {
console.log('Mail content data loaded');
// insert html into sandboxed iframe
document.getElementById('mailContentDiv').innerHTML = e.data;
// get new height and post message back to parent frame
//var newHeight = document.body.scrollHeight;
//e.source.postMessage(newHeight, e.origin);
};
}());

16
src/mail-content.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html style="overflow-y: auto">
<head>
<meta charset="utf-8">
<title>Mail</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The Scripts -->
<script src="js/mail-content-loader.js"></script>
</head>
<body>
<div id="mailContentDiv"></div>
</body>
</html>