title: how to remove keyup event listeners by javascript
body: <p>I'm using the Google autocomplete api on a text field to suggest locations as you type.
  The main problem I have with this is that Google does not let you limit results to a specific country, it just lets you bias results to area bounds which is kind of useless.</p>
  
  <p>So seaching for term <code>"ru"</code> will give you Russia in suggestions even your region is set to somewhere in Europe.</p>
  
  <p>I realized though that if you put for example "france ru" it gives you france locations only matching ru which is perfect.</p>
  
  <p>So my problem is that the autocomple is completely built by google javascript.</p>
  
  <pre><code>autocomplete = new google.maps.places.Autocomplete(input, options);
  </code></pre>
  
  <p>So I cannot easily fiddle with search string to add in to it constantly <code>"france"</code></p>
  
  <p>I can see what is bound to the <code>onkeyup</code> event on that field and can take it and call it myself however I cannot unbind it from keyup. I tried several solutions how to do it but can't find a way. jQuery unbind won't work as this is not bound through it obviously. Native functions want a reference to a function bind to listener but this is annonymous function in it. Found some examples using loops over <code>element.data['events']</code> but I get data undefined error.</p>
  
  <p>Has anyone solution to unbind all what is register in onkeyup ? </p>