Keeping two separate javascript files / snippets in same namespace
<p>I have two files that I load to the browser.</p>

<p>One is loaded directly as embedded script in the initial call.</p>

<p>The other is loaded dynamically by creating a script node and writing to the .innerHTML property.</p>

<p>I have to do things this way.</p>

<p>Both snippets of JavaScript are encapsulated in the module pattern.</p>

<p>Can I give them the same name space like this:</p>

<p><strong>Pseudo-code</strong></p>

<pre><code>var ns = Module Pattern 1

var ns = Moudule Pattern 2
</code></pre>

<p>If not, is there another way to give them the same name space so that when they return functions I can access the functions uniformly?</p>

<pre><code>ns.function1();
ns.function2();
</code></pre>

<p>Because this is for one application I'd prefer to have only one namespace.  But as I mentioned I have to load two snippets.</p>

<p>Thanks</p>
