Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
How i can fix ... 'postMessage' on 'DOMWindow':.. error

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').

How to fix my problem? I looked at the answers to this question on the forum but could not solve the problem.

<script type="text/javascript">
    const api = 'AIzaSyAZaaaXmvFvvvWkZ2bfffbz1oCAqvgSVOGYg'; // Specify your api key here

    // Load API library
    function onLoad() {
        if (api) {
            gapi.client.load('youtube', 'v3', loadYouTubeApi);
        } else {
            document.getElementById('output').innerHTML += 'API key has not been specified!';
        }
    }

    // Set API Key
    function loadYouTubeApi() {
        gapi.client.setApiKey(api);
        search('sitepoint');
    }

    // Call the search.list()
    function search(queryTerm) {
        let request = gapi.client.youtube.search.list({
            part: 'id',
            q: queryTerm
        });
        // Execute the request call and output it in HTML view
        request.execute((response) => {
            const responseString = JSON.stringify(response, '', 2);
            document.getElementById('output').innerHTML += responseString;
        })
    }
</script>
<script src="https://apis.google.com/js/client.js?onload=onLoad" type="text/javascript"></script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!