import Dom from '../../libs/dom'
import Widget from '../widget'

class Web extends Widget {
  constructor(layer, screen) {
    super(layer, screen)
    let container = Dom.createElement('div', 'web-container comp', this.el)
    this.iframe = Dom.createElement('iframe', '', container)
  }

  setPaint() {
    this.setListener()
    let paint = this.processPlaceholder(this.layer.paint)
    this.iframe.src = paint.src
  }
}

export default Web
