};
const getTargetNode = async() => {
- const region = document.querySelector('.toast-wrapper');
+ const regions = document.querySelectorAll('.toast-wrapper');
- if (region) {
- return region;
+ if (regions.length) {
+ return regions[regions.length - 1];
}
await addToastRegion(document.body, 'fixed-bottom');
*/
import {addIconToContainer} from 'core/loadingicon';
+import {addToastRegion} from 'core/toast';
/**
* @param {string} templateName
container.classList.add('layout');
container.classList.add('fullscreen');
container.setAttribute('aria-role', 'application');
+ addToastRegion(container);
// Lock scrolling on the document body.
lockBodyScroll();