Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Add namespacing method to Fuse

#10

Fuse.addNS = Fuse.prototype.addNS = function(path, parent) {
  parent = parent || this.prototype && this || this.constructor;
  var part, parts = path.split('.'), i = 0;
  while (part = parts[i++]) {
    if (parent[part]) {
      parent = parent[part];
    } else {
      parent = parent[part] = Fuse.Class.create(parent, { });
      parent.Plugin = parent.prototype;
    }
  }
  return parent;
};
 
Fuse.addNS('Dom.NodeList').Plugin = (function() {
  return { /* ... */ };
})();
 
Fuse.Dom.addNs('Form');

Reported by Joe Gornick · February 6th, 2009 @ 12:20 AM

State: resolved
Milestone: none
Assigned to: John-David Dalton John-David Dalton

Activity

  1. John-David Dalton
    John-David Dalton
    • State changed from new to resolved

    July 3rd, 2009 @ 12:22 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.