vertigo 0.2.0-alpha

Reactive Real-DOM library for Rust
Documentation
<html>
<head></head>
<body>
    <video id="myvideostream" autoplay></video>
    <div id="wrapper">
        <div id="child1" class="child">Child 1</div>
        <div id="child2" class="child">Child 2</div>
        <div id="child3" class="child">Child 3</div>
        <div id="child4" class="child">Child 4</div>
        <div id="child5" class="child">Child 5</div>
        <div id="child6" class="child">Child 6</div>
    </div>
    <!-- <iframe id="rameczka" src="https://www.onet.pl" allow="allow-same-origin"></iframe> -->
    <style>
        body {
            background-color: gray;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        #wrapper {
            width: 200px;
            height: 600px;
            overflow-y: scroll;
        }

        .child {
            height: 400px;
        }

        #child1, #child3, #child5 {
            background-color: green;
        }

        #child2, #child4, #child6 {
            background-color: rgb(0, 255, 26);
        }

        #rameczka {
            width: 300px;
            height: 300px;
        }
    </style>
    <script>
        
        // const inter = new ResizeObserver((entries) => {
        //     // console.info('entries', entries);
        //     for (const entry of entries) {
        //         entry.target.innerHTML = `${entry.contentRect.width} x ${entry.contentRect.height}`;
        //         // console.info('entry', entry);
        //     }
        // });

        // inter.observe(child1);
        // inter.observe(child2);
        // inter.observe(child6);

        const inter = new IntersectionObserver((entries) => {
            console.info('entries', entries);
        }, {
            root: wrapper,
            threshold: [0, 0.1, 0.5, 0.9, 1],
        });

        inter.observe(child1);
        inter.observe(child2);
        inter.observe(child6);

        (async () => {
            //Przechwycenie tego co jest na ekranie
            // let getScreenData = await navigator.mediaDevices.getDisplayMedia({
            //     video: true,
            //     audio: true
            // });

            //MediaStream

            const getScreenData = await navigator.mediaDevices.getUserMedia({video: true, audio: false});

            console.info('getScreenData', getScreenData);
            myvideostream.srcObject = getScreenData;


            /*
            demko pokazujące jak przechwytywać kamerkę
            https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/API/Media_Capture_and_Streams_API/Taking_still_photos/_sample_.demo.html
            */
        })();


        // setTimeout(() => {
        //     console.info('rameczka', rameczka.contentWindow.document);
        // }, 5000);

        /*
        https://fjolt.com/article/javascript-screen-capture-api
        */

        /*
        
        otworzenie chrome bez sprawdzanie zabezpieczeń
        open -na Google\ Chrome --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security

        */
    </script>
</body>
</html>