Sha256: 37ea8f13273f4a9deec70a87f47415581085195437f936b255de11bc99cefe5b

Contents?: true

Size: 383 Bytes

Versions: 8

Compression:

Stored size: 383 Bytes

Contents

import { Controller } from 'stimulus'

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

        if (height < 200) height = 200

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
maglevcms-1.5.1 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.4.0 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.3.0 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.2.2 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.2.1 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.2.0 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.1.7 app/frontend/admin/controllers/iframe_controller.js
maglevcms-1.1.6 app/frontend/admin/controllers/iframe_controller.js