Skip to content

purgeProperties

Mike Byrne edited this page Jan 25, 2022 · 2 revisions

description

Removes all properties from an object, useful in cleaning up when destroying a method

requires

  • nothing

parameters

  • none

returns

  • nothing

example usage:

this.destroy = function() {
  // remove specific event handlers
  container.removeEventListener('click', _handleClicks);

  // remove properties of this behavior
  purgeProperties(this);
};