title: jQuery UI Dialog Throw Errors When Invoked from Greasemonkey
body: <p>I'm getting this awkward error any time I try and create a dialog from
  Greasemonkey... I believe it has to do with the limitations of
  XPCNativeWrapper <a href="https://developer.mozilla.org/en/XPCNativeWrapper#Limitations_of_XPCNativeWrapper" rel="nofollow noreferrer">https://developer.mozilla.org/en/XPCNativeWrapper#Limitations_of_XPCNativeWrapper</a>
  ,  though I am not 100% sure.</p>
  
  <p>None of the core jQuery methods that I've used have caused errors
  (append, css, submit, keydown, each, ...).</p>
  
  <p>It is possible that this could be an error in Greasemonkey or due to
  the interaction between Greasemonkey and jquery ui, but I am really
  interested in figuring out how to get them to work together.</p>
  
  <pre><code>// ==UserScript==
  // @name           Dialog Test
  // @namespace      http://strd6.com
  // @description    jquery-ui-1.6rc6 Dialog Test
  // @include        *
  //
  // @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js
  // @require        http://strd6.com/stuff/jqui/jquery-ui-personalized-1.6rc6.min.js
  
  // ==/UserScript==
  
  $(document).ready(function() {
   $('&lt;div title="Test"&gt;SomeText&lt;/div&gt;').dialog();
  });
  </code></pre>
  
  <p>Error:
  [Exception... "Component is not available" nsresult: "0x80040111
  (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
  file:///home/daniel/.mozilla/firefox/.../components/greasemonkey.js ::
  anonymous :: line 347" data: no]
  [Break on this error] if (line) {</p>
  
  <p>Firefox version:
  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020911
  Ubuntu/8.04 (hardy) Firefox/3.0.6</p>
  
  <p>Update: The focus() method from the standard jQuery library also throws the same error: </p>
  
  <pre><code>$('body').focus();
  </code></pre>
  
  <p>Maybe the UI is calling the focus method at some point?</p>
  
  <p>Any help will be greatly appreciated!</p>