Module: EffectiveIframeHelper

Defined in:
app/helpers/effective_iframe_helper.rb

Instance Method Summary collapse

Instance Method Details

#iframe_srcdoc_tag(srcdoc) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/effective_iframe_helper.rb', line 5

def iframe_srcdoc_tag(srcdoc)
  (
    :iframe, 
    '',
    srcdoc: srcdoc,
    style: 'frameborder: 0; border: 0; width: 100%; height: 100%;',
    onload: "this.style.height=(this.contentDocument.body.scrollHeight + 30) + 'px';",
    scrolling: 'no'
  )
end