Hi there,
I am trying to get your component to work inside of Vue 2 I was able to get the npm installed and my host page running. I have the client script installed in the child iframe as well, but am getting this warning/error:
[iFrameSizer][Host page: oauth2relay737909339] IFrame has not responded within 10 seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ingored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.
I also setup the callbacks, but the messages that come back on resize and message are ‘undefined’.
<template>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-flat">
<!-- <iframe id="myIframe" :src="getTarget()" scrolling="no" ref="myIFrame" /> -->
<iframe id="myIframe" src="https://www.trueatlas.com/vanilla.html" scrolling="no" ref="myIFrame">
</iframe>
</div>
</div>
</div>
</template>
<script lang="ts">
import * as Vue from 'vue'
import { NavigationService } from '../../shared/Utilities/Navigation';
import * as resizer from 'iframe-resizer';
import { Bus } from '../../main';
export default {
name: 'iFrameHolder',
data() {
return {
NS: NavigationService,
ifr: resizer,
}
},
components: { resizer },
methods:
{
msgCB: function () {
console.log('got ready');
},
gotMessage: function (messageData) {
console.log(messageData)
},
resizeIframe: function (height) {
console.log(height);
//document.getElementById('frame_name_here').height = parseInt(height)+60;
},
getiFrameWidth: function () {
return this.$store.state.iframeWidth;
},
getiFrameHeight: function () {
return this.$store.state.iframeHeight;
},
getTarget: function () {
return this.$store.state.iframeTarget;
}
},
updated: function () {
this.ifr.iframeResizer({ log: true, warningTimeout: 10, checkOrigin: false, autoResize: true, resizeFrom: 'child', messageCallback: function (messageData) { console.log() }, readyCallback: this.msgCB() }, this.$refs.myIFrame);
},
created: function () {
this.NS = new NavigationService();
this.NS.router = this.$router;
this.$store.state.Crumb = "";
this.ifr.iframeResizer({ log: true, warningTimeout: 10000, checkOrigin: false, autoResize: true, resizeFrom: 'child', resizedCallback: this.gotMessage(), messageCallback: this.gotMessage(), readyCallback: this.msgCB() }, this.$refs.myIFrame);
}
}
</script>
<style>
iframe {
width: 100%
}
</style>
Issue Analytics
- State:
- Created 6 years ago
- Comments:25 (3 by maintainers)
Top Results From Across the Web
Vue.js - The Progressive JavaScript Framework | Vue.js
Approachable. Builds on top of standard HTML, CSS and JavaScript with intuitive API and world-class documentation. · Performant. Truly reactive, compiler- ...
Read more >Vue.js is a progressive, incrementally-adoptable JavaScript ...
Vue (pronounced /vjuː/ , like view) is a progressive framework for building user interfaces. It is designed from the ground up to be...
Read more >Vue.js - Wikipedia
Vue.js is an open-source model–view–viewmodel front end JavaScript framework for building user interfaces and single-page applications.
Read more >Pearson VUE: Computer-Based Test (CBT) development and ...
Pearson VUE delivers high-stakes exams that empower professions to certify and license individuals who safeguard and advance their communities across the ...
Read more >Vue | Cinema Listings & Latest Movies | Book Film Tickets
Roald Dahl's Matilda The Musical Whitney Houston: I Wanna Dance With Somebody Strange World Black Panther: Wakanda Forever The Menu Corsage Violent Night...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good idea, this should work:
Now we can pass options like this:
Why does my use in vue not work?