{"action":"created","issue":{"url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/513","repository_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer","labels_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/513/comments","events_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/513/events","html_url":"https://github.com/davidjbradshaw/iframe-resizer/issues/513","id":251719504,"number":513,"title":"Vue","user":{"login":"SmarterPhoneLabs","id":1190629,"avatar_url":"https://avatars2.githubusercontent.com/u/1190629?v=4","gravatar_id":"","url":"https://api.github.com/users/SmarterPhoneLabs","html_url":"https://github.com/SmarterPhoneLabs","followers_url":"https://api.github.com/users/SmarterPhoneLabs/followers","following_url":"https://api.github.com/users/SmarterPhoneLabs/following{/other_user}","gists_url":"https://api.github.com/users/SmarterPhoneLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/SmarterPhoneLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmarterPhoneLabs/subscriptions","organizations_url":"https://api.github.com/users/SmarterPhoneLabs/orgs","repos_url":"https://api.github.com/users/SmarterPhoneLabs/repos","events_url":"https://api.github.com/users/SmarterPhoneLabs/events{/privacy}","received_events_url":"https://api.github.com/users/SmarterPhoneLabs/received_events","type":"User","site_admin":false},"labels":[{"id":720514502,"url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/labels/Help%20wanted","name":"Help wanted","color":"39ef57","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-08-21T17:07:33Z","updated_at":"2018-05-02T14:18:32Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nI am trying to get your component to work inside of Vue 2\r\nI was able to get the npm installed and my host page running.\r\nI have the client script installed in the child iframe as well, but am getting this warning/error:\r\n\r\n[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.\r\n\r\nI also setup the callbacks, but the messages that come back on resize and message are 'undefined'.\r\n\r\n```\r\n<template>\r\n\t<div class=\"row\">\r\n\t\t<div class=\"col-lg-12\">\r\n\t\t\t<div class=\"panel panel-flat\">\r\n\t\t\t\t<!-- <iframe id=\"myIframe\" :src=\"getTarget()\" scrolling=\"no\" ref=\"myIFrame\" />  -->\r\n\t\t\t\t<iframe id=\"myIframe\" src=\"https://www.trueatlas.com/vanilla.html\" scrolling=\"no\" ref=\"myIFrame\">\r\n\t\t\t\t</iframe>\r\n\r\n\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</template>\r\n<script lang=\"ts\">\r\n\timport * as Vue from 'vue'\r\n\timport { NavigationService } from '../../shared/Utilities/Navigation';\r\n\timport * as resizer from 'iframe-resizer';\r\n\timport { Bus } from '../../main';\r\n\texport default {\r\n\t\tname: 'iFrameHolder',\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tNS: NavigationService,\r\n\t\t\t\tifr: resizer,\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomponents: { resizer },\r\n\t\tmethods:\r\n\t\t{\r\n\t\t\tmsgCB: function () {\r\n\t\t\t\tconsole.log('got ready');\r\n\t\t\t},\r\n\t\t\tgotMessage: function (messageData) {\r\n\t\t\t\tconsole.log(messageData)\r\n\t\t\t},\r\n\t\t\tresizeIframe: function (height) {\r\n\t\t\t\tconsole.log(height);\r\n\t\t\t\t//document.getElementById('frame_name_here').height = parseInt(height)+60;\r\n\t\t\t},\r\n\t\t\tgetiFrameWidth: function () {\r\n\t\t\t\treturn this.$store.state.iframeWidth;\r\n\t\t\t},\r\n\t\t\tgetiFrameHeight: function () {\r\n\t\t\t\treturn this.$store.state.iframeHeight;\r\n\t\t\t},\r\n\t\t\tgetTarget: function () {\r\n\r\n\t\t\t\treturn this.$store.state.iframeTarget;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tupdated: function () {\r\n\t\t\tthis.ifr.iframeResizer({ log: true, warningTimeout: 10, checkOrigin: false, autoResize: true, resizeFrom: 'child', messageCallback: function (messageData) { console.log() }, readyCallback: this.msgCB() }, this.$refs.myIFrame);\r\n\t\t},\r\n\t\tcreated: function () {\r\n\t\t\tthis.NS = new NavigationService();\r\n\t\t\tthis.NS.router = this.$router;\r\n\t\t\tthis.$store.state.Crumb = \"\";\r\n\r\n\t\t\tthis.ifr.iframeResizer({ log: true, warningTimeout: 10000, checkOrigin: false, autoResize: true, resizeFrom: 'child', resizedCallback: this.gotMessage(), messageCallback: this.gotMessage(), readyCallback: this.msgCB() }, this.$refs.myIFrame);\r\n\r\n\r\n\t\t}\r\n\t}\r\n\r\n</script>\r\n<style>\r\n\tiframe {\r\n\t\twidth: 100%\r\n\t}\r\n</style>\r\n```"},"comment":{"url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/comments/385993724","html_url":"https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-385993724","issue_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/513","id":385993724,"user":{"login":"GranitSahatqija","id":7763348,"avatar_url":"https://avatars2.githubusercontent.com/u/7763348?v=4","gravatar_id":"","url":"https://api.github.com/users/GranitSahatqija","html_url":"https://github.com/GranitSahatqija","followers_url":"https://api.github.com/users/GranitSahatqija/followers","following_url":"https://api.github.com/users/GranitSahatqija/following{/other_user}","gists_url":"https://api.github.com/users/GranitSahatqija/gists{/gist_id}","starred_url":"https://api.github.com/users/GranitSahatqija/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GranitSahatqija/subscriptions","organizations_url":"https://api.github.com/users/GranitSahatqija/orgs","repos_url":"https://api.github.com/users/GranitSahatqija/repos","events_url":"https://api.github.com/users/GranitSahatqija/events{/privacy}","received_events_url":"https://api.github.com/users/GranitSahatqija/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T14:18:32Z","updated_at":"2018-05-02T14:18:32Z","author_association":"NONE","body":"Iframe has an onload callback, so you can do this:\r\n\r\n`<iframe src=\"https://myiframesource.com\" @load=\"myMethod\">`\r\n\r\nAnd on your method, just trigger the resizer"}}
{"actor":{"display_login":"GranitSahatqija"}}