Skip to content

Commit

Permalink
Merge pull request #211 from positivecrash/main
Browse files Browse the repository at this point in the history
iframe
  • Loading branch information
positivecrash authored Jun 7, 2024
2 parents a6b60b9 + d0fa5e4 commit f48e25b
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/pages/demoapps/johnnyb-lab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</section>

<section class="container__mid">
<iframe id="appframe" src="https://johnnyb-lab.robonomics.academy" sandbox="allow-forms allow-scripts allow-cross-origin" referrerpolicy="cross-origin" scrolling="no" :onload="resizeIframe()" />
<iframe id="appframe" src="https://johnnyb-lab.robonomics.academy" sandbox="allow-forms allow-scripts allow-cross-origin" referrerpolicy="cross-origin" scrolling="no" />
</section>
</Layout>
</template>
Expand All @@ -36,20 +36,20 @@ export default {
MetaInfo: () => import('~/components/MetaInfo.vue')
},
methods: {
resizeIframe() {
if (typeof document !== 'undefined') {
try{
const iframe = document.getElementById("appframe");
if(iframe) {
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
}
} catch(e) {
console.log(e);
}
}
}
},
// methods: {
// resizeIframe() {
// if (typeof document !== 'undefined') {
// try{
// const iframe = document.getElementById("appframe");
// if(iframe) {
// iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
// }
// } catch(e) {
// console.log(e);
// }
// }
// }
// },
// mounted() {
// window.addEventListener('resize', this.resizeIframe);
Expand Down

0 comments on commit f48e25b

Please sign in to comment.