Skip to content

"fill" corrupts namespace of PNotify and likely javascript libraries #37

@alexpmorris

Description

@alexpmorris

I wanted to try rhaboo and had a strange conflict with PNotify. It turns out that PNotify was being redirected to use rhaboo's version of "fill". I basically solved the problem by commenting out fill:

var Array_rhaboo_originals = Array_rhaboo_originals || {
  pop : Array.prototype.pop,
  push : Array.prototype.push,
  shift : Array.prototype.shift,
  unshift : Array.prototype.unshift,
  splice : Array.prototype.splice,
  reverse : Array.prototype.reverse,
  sort : Array.prototype.sort,
  //fill : Array.prototype.fill,
};

//Array.prototype.fill = Array_rhaboo_defensively("fill");

I believe the problem also affects all the others as well (especially pop/push), so all of these probably need to be better encapsulated to avoid contaminating the variable namespace.

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