safari-extension

Can a site invoke a browser extension?

怎甘沉沦 提交于 2019-11-26 03:53:42
问题 I am a newbie to the browser extension development and I understand the concept of browser extensions altering the page and injecting codes into it. Is there a way this direction can be turned around? I write an extension that provides a set of APIs, and web sites that want to use my extension can detect its presence and if it is present, the website can call my API methods like var extension = Extenion(foo, bar) . Is this possible in Chrome, Firefox and Safari? Example: Google created a new