Search code examples
flashzeroclipboard

ZeroClipboard JavaScript library throws Uncaught Error: Error calling method on NPObject


I am trying to copy content to clipboard using https://github.com/zeroclipboard/ZeroClipboard. It seems a good library, but I am getting the error 'Error calling method on NPObject.' when the copy button (a flash) is hovered.

Seems like a flash security problem, but I am able to load the flash content.

Any ideas?


Solution

  • I got it work. It was a same origin security model breech. My web apps subdomain was 'WWW' but the flash content was served from 'CDN'. Just rendered both the contents from same subdomain.

    Find more @ https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference/Scripting_plugins?redirectlocale=en-US&redirectslug=Gecko_Plugin_API_Reference%3AScripting_plugins#NPObject

    Thanks.