Skip to content

Instantly share code, notes, and snippets.

@dmonad
Last active August 29, 2015 14:08
Show Gist options
  • Save dmonad/3ff7c31e5582adf3cb2a to your computer and use it in GitHub Desktop.
Save dmonad/3ff7c31e5582adf3cb2a to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../ace-element/ace-element.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#speech_mic {
left: 1180px;
top: 390px;
position: absolute;
}
#ace_element {
width: 400px;
height: 300px;
left: 480px;
top: 330px;
position: absolute;
}
</style>
<speech-mic id="speech_mic"></speech-mic>
<ace-element value="{{ textinput }}" id="ace_element">nn</ace-element>
</template>
<script>
Polymer({
ready: function(){
console.log("ready");
var that = this;
function doit(e){
console.log("dutrane");
that.textinput = e.detail.transcript
}
this.$.speech_mic.addEventListener("speech-mic-result", doit);
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment