Tried with
var target = document.getElementsByClassName('modal-header slds-modal__header');
and
var label = document.getElementsByTagName('p');
but in both empty array is recieved.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityTried with
var target = document.getElementsByClassName('modal-header slds-modal__header');
and
var label = document.getElementsByTagName('p');
but in both empty array is recieved.
Due to the Locker-Service, you can not communicate with the container app. Either use the force:lightningQuickActionWithoutHeader interface or use the bundle version less than 39.0.
You can verify it by executing the same code snippet in chrome console. If you get something in the Chrome console then Lightning Locker Service is creating an isolation layer.
I hope it serves your purpose.