Keeping two separate javascript files / snippets in same namespace
===

I have two files that I load to the browser.

One is loaded directly as embedded script in the initial call.

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

I have to do things this way.

Both snippets of JavaScript are encapsulated in the module pattern.

Can I give them the same name space like this:

**Pseudo-code**

    var ns = Module Pattern 1
    
    var ns = Moudule Pattern 2

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?

    ns.function1();
    ns.function2();

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

Thanks
