4.6 - Track information

Introduction

Schermafbeelding 2020-06-17 om 17 13 45 When users click on the information button information about the track appears on the screen: 5124a01b754972ad2e545feacf051eaf

How it works

This element also function within a MutationObserver similair to the workspaceplaylist:

const observer = new MutationObserver(function(mutations) {

mutations.forEach(function(mutation) {
if(mutation){

// this is where the eventListeners are placed
...
}

const results = document.querySelector('.search-results')
const projectPage = document.querySelector('.project-page')

observer.observe(results, {
    childList: true,
    attributes: true,
    characterData: true,

})
observer.observe(projectPage, {
    childList: true,
    attributes: true,
    characterData: true,

})
})

The difference is that here we are looking to place click events at the info anchortags:

Last updated

Was this helpful?