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