Skip to content

Instantly share code, notes, and snippets.

@ajbetteridge
Forked from davglass/gist:359781
Created November 29, 2011 14:34
Show Gist options
  • Save ajbetteridge/1405007 to your computer and use it in GitHub Desktop.
Save ajbetteridge/1405007 to your computer and use it in GitHub Desktop.

Revisions

  1. @davglass davglass created this gist Apr 8, 2010.
    10 changes: 10 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    YUI().use('event', 'io', 'nodejs-dom', function(Y) {
    //Do your stuff

    //Inside the request handler callback:
    //Now each request get's a new DOM and not a shared one.
    Y.use('nodejs-dom', function(Y) {
    var document = Y.Browser.document;
    document.createElement('div');
    });
    });