Sha256: fa97c42926828455e53282a8130463ba7899d0cff88f3f90bed747fbb632feb7

Contents?: true

Size: 336 Bytes

Versions: 8

Compression:

Stored size: 336 Bytes

Contents

import { Controller } from 'stimulus'

export default class extends Controller {
  connect() {
    this.element.addEventListener('load', () => {
      let height =
        this.element.contentDocument.querySelector('body').clientHeight

      if (height < 200) height = 200

      this.element.style.height = `${height}px`
    })
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
maglevcms-1.1.3 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.1.2 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.1.1 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.1.0 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.0.0 app/javascript/controllers/iframe_controller.js
maglevcms-1.0.0.rc3 app/javascript/controllers/iframe_controller.js
maglevcms-1.0.0.rc2 app/javascript/controllers/iframe_controller.js
maglevcms-1.0.0.rc1 app/javascript/controllers/iframe_controller.js