console
Console Standard (by whatwg)
native-messaging
Native Messaging Host Protocol for Browser Extensions (by simov)
console | native-messaging | |
---|---|---|
5 | 6 | |
266 | 47 | |
0.8% | - | |
4.1 | 0.0 | |
3 months ago | 11 months ago | |
HTML | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
console
Posts with mentions or reviews of console.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-11-17.
-
Why can you overrule console.log?
console is not part of the JavaScript programming language. WHATWG has published Console Standard https://console.spec.whatwg.org/ though console is not defined in ECMA-262.
-
JavaScript Standard Input/Output: Unspecified
WHATWG's Console mentions stdout several times, does not mention stdin. Using console.log() in a Native Messaging host does not work, as we are not printing to a TTY. That W.I.P. is not applicable reading stdin at all.
-
script.js:27 Uncaught TypeError: console is not a function at HTMLDocument.<anonymous> (script.js:27:5) Why is it showing error?
https://github.com/whatwg/console/issues is the link so you can tell them they are wrong.
-
Debugging Tactics
There are a few others too. My favorite is console.group (and console.groupEnd).
-
JavaScript: How to Power Up Your Logging
A standard exists on how logging using console should work, but unfortunately not all browsers respect it.
native-messaging
Posts with mentions or reviews of native-messaging.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-11-17.
-
JavaScript Standard Input/Output: Unspecified
// Bun Native Messaging host // guest271314, 10-9-2022 async function getMessage() { const { promise, resolve } = Promise.withResolvers(); // https://github.com/simov/native-messaging/blob/8e99d2a345ae94426a502d05aa5d57b966f6bc78/protocol.js let messageLength = 0, bytesWritten = 0, input = [];
-
How would you fix this Node.js bug?
Does not send messages from host to browser equal or to 65536 length.
-
How to read Node.js process.stdin without using process.stdin.on('readable', () => {})?
In Node.js this code https://github.com/simov/native-messaging/blob/master/protocol.js does this
-
process.stdin.read() without using process.stdin.on('readable', ()=.{})
https://github.com/simov/native-messaging/blob/master/nodejs/example.js#:~:text=Raw,Footer
-
Node.js in Chrome extension
Yes. You can utilize Native Messaging. See https://github.com/simov/native-messaging.
-
Why does RSS constantly grow when reading data from a child process and calling process.stdout.write()?
// Node.js Native Messaging host // https://github.com/simov/native-messaging/blob/master/protocol.js // https://github.com/simov/native-messaging/blob/master/nodejs/example.js // Might be good to use an explicit path to node on the shebang line // in case it isn't in PATH when launched by Chrome process.stdin.on('readable', () => { let input = []; let chunk; while ((chunk = process.stdin.read())) { input.push(chunk); } input = Buffer.concat(input); const msgLen = input.readUInt32LE(0); const dataLen = msgLen + 4; if (input.length >= dataLen) { const content = input.slice(4, dataLen); const json = JSON.parse(content.toString()); handleMessage(json); } });
What are some alternatives?
When comparing console and native-messaging you can also consider the following projects:
streams - Streams Standard
better-onetab - :bookmark_tabs: A better OneTab for Chrome :memo: Temporarily removed from firefox :construction: V2 is WIP
wpt - Test suites for Web platform specs — including WHATWG, W3C, and others
node - Node.js JavaScript runtime ✨🐢🚀✨
proposal-common-minimum-api
firefox-mute-site - Firefox extension that allows to instantly mute/unmute all tabs from a website
omni - The all-in-one tool to supercharge your productivity ⌨️
markdown-viewer - Markdown Viewer / Browser Extension
node-v0.x-archive - Moved to https://github.com/nodejs/node
captureSystemAudio - Capture system audio ("What-U-Hear")
console vs streams
native-messaging vs better-onetab
console vs wpt
native-messaging vs node
console vs proposal-common-minimum-api
native-messaging vs firefox-mute-site
native-messaging vs omni
native-messaging vs markdown-viewer
native-messaging vs node-v0.x-archive
native-messaging vs proposal-common-minimum-api
native-messaging vs captureSystemAudio