       plot: (x) => @show x
       plotsize: => @plotSize()
       ploturl: (url) => @ploturl url
-      newpane: (id, url, opts) => @newpane(id, url, opts)
+      jlpane: (id, opts) => @jlpane(id, opts)
     @create()
 
   create: ->

      style: 'width: 100%; height: 100%'
    @ensureVisible()
    @pane.show v
    v.addEventListener('console-message', (e) => console.log(e.message))

  newpane: (id, url, opts={}) ->
    v = undefined
    if url
      v = views.render webview
        class: 'blinkjl',
        disablewebsecurity: true,
        src: url,
        style: 'width: 100%; height: 100%'
      v.addEventListener('console-message', (e) => console.log(e.message))

    pane = @ink.HTMLPane.fromId(id)

    pane.show({
      item: v,
      icon: opts.icon,
      title: opts.title
    })

    pane.ensureVisible({
      split: opts.split || 'right'
    })


{webview} = views.tags

consoleLog = (e) ->
  if e.level is 0
    log = console.log
  else if e.level is 1
    log = console.warn
  else if e.level is 2
    log = console.error
  log(e.message, "\nat #{e.sourceID}:#{e.line}")

module.exports =
  activate: ->
