Does Snap run on a VM or on my computer?

I'm trying to use a custom block that detects OS
But my computer is linux.
I did

return window.navigator.userAgent

It says I'm using X11 on the snap editor but the console saids Linux...
So does Snap run on a VM and is that why this is happening?

ChromeOS is based off of Linux, so that's probably why it's reporting Linux.

It's reporting UNIX while I have Linux -_-

linux is a UNIX system

but why does it say unix on the snap editor but when I open the console on the snap editor page, and type the same command in, it saids linux? How is it possible? Both commands are ran on the same page, both commands are the same, and it returns a different value?

and check here:
https://www.google.com/search?q=is+linux+unix&rlz=1CAUHHJ_enUS927&oq=is+linux+un&aqs=chrome.0.0i457j69i57j0l2j0i395l2j0i10i22i30i395j0i22i30i395l3.4552j1j9&sourceid=chrome&ie=UTF-8&safe=active&ssui=on

First result:
Linux is not Unix , but it is a Unix -like operating system. Linux system is derived from Unix and it is a continuation of the basis of Unix design. Linux distributions are the most famous and healthiest example of the direct Unix derivatives. BSD (Berkley Software Distribution) is also an example of a Unix derivative.

AHEMMMM

AND WAIT WAIT WAIT WAIT
BSD (Berkley Software Distribution) ?
This probably explains it all
Berkeley made this and prob the server also
that's why it unix

Where is it reporting Unix? It should be reporting Linux.

This is completely offtopic. The server runs Linux, and the domain name has nothing to do with what the user agent is.

I know I have been trying I double and triple and quadripled checked the code
On the console is saids I have Linux but on Snap it saids UNIX

Where exactly does it say Unix?

wait lemme do something first

Here LINK TO BUG
first click on the os block
then run the code in a comment on the console
FOR THIS TO WORK YOU NEED TO HAVE CHROMEBOOK

X11 does not indicate Unix. Linux uses X11 too. Delete that line.

But what if someone has UNIX and then it wont work

And plus nows its unknown...

Change it to report Linux if it has Linux or X11.

So you copied the code from here: https://stackoverflow.com/a/38048145

ok
BUT
if you do

alert(window.navigator.appVerison)

on the snap editor, and then try it on the console,
It returns 2 different results

Try this: https://stackoverflow.com/a/38241481

works now

me gonna give you credit when I release the Smap! library to the pulbic