From 374ab6d8980b810a1c943b14a1aea07cb85389ad Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 15 May 2012 13:26:07 -0700 Subject: Saving body attributes --- js/mediators/io-mediator.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index aa2165c7..8346c75e 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -224,8 +224,14 @@ exports.IoMediator = Montage.create(Component, { //Injecting head and body into old document template.file.content.document.head.innerHTML = template.head.innerHTML.replace(regexRootUrl, ''); template.file.content.document.body.innerHTML = template.body.innerHTML.replace(regexRootUrl, ''); - - + //Copying attributes to maintain same properties as the + for (var n in template.body.attributes) { + if (template.body.attributes[n].value) { + // + template.file.content.document.body.setAttribute(template.body.attributes[n].name, template.body.attributes[n].value); + } + } + //TODO: Add attribute copying for and /* //Testing using montage clean up method -- cgit v1.2.3