You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
367 B
21 lines
367 B
tag app-prompt
|
|
|
|
active = no
|
|
|
|
def get_input s
|
|
input_text = s
|
|
active = yes
|
|
let result = await new Promise! do |resolve|
|
|
self.addEventListener('end') do |e|
|
|
self.removeEventListener('end', this)
|
|
resolve(e.detail)
|
|
active = no
|
|
result
|
|
|
|
def end
|
|
emit('end', input_text)
|
|
|
|
def render
|
|
<self>
|
|
<input bind=input_text>
|
|
<button@click=end> 'Done.'
|
|
|