• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Cross domain messaging in Opera Mini

    Opera Mini
    2
    4
    1567
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • queueitmala
      queueitmala last edited by

      I have implemented a cross domain messaging between the main page and an iframe. It works on all browsers except for Opera Mini.

      The parent page has the following code:

      if (window.addEventListener) {
          window.addEventListener("message", function(event) { alert(event.data);}, false);
      } else if (window.attachEvent) {
          window.attachEvent("onmessage", function(event) { alert(event.data);});
      }
      

      The iframe page has this code:

      window.parent.postMessage('test', '*');
      

      When the iframe tries to access window.parent to execute the postMessage method Opera Mini throws an exception: 'Security error: attempted to read protected variable'. All other browsers will not complain.

      See example here: http://mala.s3-eu-west-1.amazonaws.com/main.html

      Is there a workaround?

      Reply Quote 0
        1 Reply Last reply
      • A Former User
        A Former User last edited by

        Thanks for your report and providing the code snippets. I'm happy to tell you that we managed to find the root cause of this issue and the fix is awaiting deployment. It should be live either this or next week unless it causes some other nasty bugs to appear here and there 🙂 I'll keep you posted.

        Reply Quote 0
          1 Reply Last reply
        • A Former User
          A Former User last edited by

          @queueitmala: Should be okey now - can you verify if it works for you?

          Reply Quote 0
            1 Reply Last reply
          • queueitmala
            queueitmala last edited by

            I can verify both the example and our application is working. I got some errors in our log on the 17th, but I suppose the update has to be pushed out first. Thank you.

            Reply Quote 0
              1 Reply Last reply
            • First post
              Last post

            Computer browsers

            • Opera for Windows
            • Opera for Mac
            • Opera for Linux
            • Opera beta version
            • Opera USB

            Mobile browsers

            • Opera for Android
            • Opera Mini
            • Opera Touch
            • Opera for basic phones

            • Add-ons
            • Opera account
            • Wallpapers
            • Opera Ads

            • Help & support
            • Opera blogs
            • Opera forums
            • Dev.Opera

            • Security
            • Privacy
            • Cookies Policy
            • EULA
            • Terms of Service

            • About Opera
            • Press info
            • Jobs
            • Investors
            • Become a partner
            • Contact us

            Follow Opera

            • Opera - Facebook
            • Opera - Twitter
            • Opera - YouTube
            • Opera - LinkedIn
            • Opera - Instagram

            © Opera Software 1995-