title: Can Firefox use document.execCommand in a textarea?
body: <p>With the cursor in a contenteditable <code>div</code>, both Chrome and Firefox can emulate typing "sometext" like this:</p>
  
  <pre><code>document.execCommand('insertText', false, 'sometext');
  </code></pre>
  
  <p>In Chrome, this works when you're in a <code>textarea</code> as well. In Firefox, I get the error "NS_ERROR_FAILURE:".</p>
  
  <p>Here's a fiddle to demonstrate: <a href="http://jsfiddle.net/ukx37/" rel="noreferrer">http://jsfiddle.net/ukx37/</a>. In Chrome, hit enter and you type "ENTER\n". In Firefox, you type "\n" and get an error NS_ERROR_FAILURE.</p>
  
  <p>Does anybody know if there's a way to get this working in Firefox? Or, if not, is there some way I can test for support without a try-catch statement?</p>
  
  <p>Also, I don't want to manually edit the textarea's value because doing so breaks the edit history.</p>