Skip to content

Commit

Permalink
feat: add Otechie('close') command
Browse files Browse the repository at this point in the history
  • Loading branch information
dgwight committed Dec 18, 2020
1 parent 2ac2e18 commit cd723c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ function main (type, args) {
return show()
case 'open':
return open()
case 'close':
return close()
default:
return
}
Expand Down Expand Up @@ -95,4 +97,9 @@ function open () {
iframe.contentWindow.focus()
}

function close () {
widget.classList.remove('OtechieWidget--open')
body.classList.remove('OtechieWidget--lock')
}

app(window)

0 comments on commit cd723c1

Please sign in to comment.