Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
at HTMLIFrameElement.iframe.onload (file:///C:/Users/%D0%96%D0%B5%D0%BD%D1%8F/Desktop/%D0%92%D0%B0%D0%B6%D0%BD%D1%8B%D0%B5%20%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B/JavaScriptProjects/test.html:6:35)
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/6abPOYMDDgM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen id="iframe"></iframe>
</body>
<script>
iframe.onload = function(e){
console.log(iframe.contentWindow.document.getElementsByClassName("style-scope")[0]);
}
</script>