Wk-notes-11-29-npm-fix-aem-datalayer-test

A11y

Good link: http://pauljadam.com/demos/aria-atomic-relevant.html

npm pkg vulnerability

Use npm audit fix

AEM DataLayer local Test

  • Mock global dataLayer

window.dataLayer = {
  setEvent: function(e){ 
    console.log(JSON.stringify(e));
    this.digitalData.event.push(e)
  }, 
  digitalData:{ event:[] }
};

NOT a very good solution, since DataLayer could be injected when the some function being defined (Either due to shitty code or global variable pollution prevention).

  • Mock a AEM page with <scripts> src to localhost:PORT, which is a easy way for local testing with context.

Last updated