Is it possible to develop Google Chrome extensions using node.js?

后端 未结 2 986
执笔经年
执笔经年 2020-12-04 08:08

I\'d like to start developing Google Chrome extension using node.js (since I\'ve already written a \"text-to-song\" script in node.js, and I\'d like to turn it into a Chrome

2条回答
  •  情书的邮戳
    2020-12-04 08:33

    Simple answer is NO, unless you can find a way to install node.js with an extension using NPAPI.

    Nodejs and a Google Chrome Extension do have a couple things in common i.e they both understand javascript and they both use the v8 javascript engine.

    Google Chrome Extension

    "Google Chrome Extensions are small software programs that can modify and enhance the functionality of the Chrome browser".

    To develop a Google Chrome Extension you should write some javascript and or html/css. Then you can run the extension in your browser.

    If you wish for others to download your extension you will have to provide config.json file that describes you extension sets permissions etc.

    Nodejs

    "Node.js is a platform built on Google Chrome's JavaScript runtime for easily building fast, scalable network applications".

    To develop applications in nodejs you write some javascript and or html/css for web applications.

    If wish for others to use you application you start you nodejs server and listen for incoming requests.

    Summary

    Despite some of the similarities a Google Chrome Extension and Nodejs have nothing to with each other. You cannot use them together in some special way outside of the normal client/server communication.

提交回复
热议问题