Skip to content

Runtime detection of duplicate module definitions #7

@jasonmcaffee

Description

@jasonmcaffee

if a module is defined twice during runtime, there can be issues, so provide detection.

var context = {};
context.moduleA = function(moduleB){}
context.moduleA = function(){}

we can probably facilitate this with getter setters or observers.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Defining_getters_and_setters

modulus.init({
    _defineContextSetter:function(){
         //by default use native. if devs want to polyfill, they can override this function.
    }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions