Skip to content

Instantly share code, notes, and snippets.

@hirokiky
Created May 31, 2017 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirokiky/991bd502a9b0cdef0bf180c8baf4b3b3 to your computer and use it in GitHub Desktop.
Save hirokiky/991bd502a9b0cdef0bf180c8baf4b3b3 to your computer and use it in GitHub Desktop.
<script>
directives: {
'inner-height': {
bind: function() {
this.el.addEventListener('load', () => {
var doc = this.el.contentDocument || this.el.contentWindow.document;
this.el.style.height = doc.body.scrollHeight + 'px';
});
}
}
}
</script>
<template>
<iframe :srcdoc="quest.selectedQuestion.syakyo_html"
scrolling="no"
v-inner-height></iframe>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment