Answers for "array of elemts by class ts"

0

array of elemts by class ts

const showSlides = () => {
    const slides = document.getElementsByClassName('slide');

    for (let i = 0; i < slides.length; i++) {
        const slide = slides[i];

        if (slide instanceof HTMLElement) {
            // slide is a HTMLElement
            slide.style.display = "none";
        } else if (slide instanceof SVGElement) {
            // slide is a SVGElement
            const svgOwner = slide.ownerSVGElement;
        } else {
            // slide is a Element
            const baseUri = slide.baseURI;
        }
    }
};
Posted by: Guest on March-20-2021

Code answers related to "array of elemts by class ts"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language