Closed keyiis closed 6 years ago
I want prevent drop in accepts method,i need judge the mirror element's previousElementSibling,so how can i get mirror element in accepts method?
accepts: (el, target, source, sibling)=> { return !(mirror element).previousElementSibling.classList.contains('add-item-btn'); }
You could try using pure JS:
document.querySelector('.gu-mirror').previousElementSibling.classList.contains('add-item-btn');
@renannobile thks reply!
I want prevent drop in accepts method,i need judge the mirror element's previousElementSibling,so how can i get mirror element in accepts method?