From: rwldrn Date: Mon, 20 Dec 2010 15:01:13 +0000 (-0500) Subject: merge fix X-Git-Tag: v0.2~34^2~1^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b983e63130863688540efb229ea6a93a63f38d07;p=popcorn-js.git merge fix --- diff --git a/popcorn.js b/popcorn.js index d5faf6d..1d646fa 100644 --- a/popcorn.js +++ b/popcorn.js @@ -26,7 +26,15 @@ init: function( entity ) { var elem, matches; - + + + if ( typeof entity === "function" ) { + + document.addEventListener( "DOMContentLoaded", entity, false); + + return; + } + matches = rIdExp.exec( entity ); if ( matches.length && matches[2] ) { @@ -714,6 +722,8 @@ return data; }; + + global.Popcorn = Popcorn;