Unfortunately this browser doesn't support orientation so will not show your correct heading.
Chrome 40.0.2214.111 on Yosemite. Not really cross-browser when its not working in newest Chrome ...
Edit: tried it on iPhone, its working but orientation is reversed. For example I turn to North, turn left 90 deg and instead of showing West, its showing East.
What did you expect it to do on your laptop? It's a compass. It's pretty fundamentally tied to the orientation service. And of course laptops don't tend to have gyroscopes in them.
Laptops, including Macbooks made since 2010 or so have gyroscopes in them. Originally for the purpose of detecting a fall and parking the drive head before impact.
If it's based on GPS, you could get a rough idea of where north was for the user, on average, while they were moving. It would be very static and wouldn't lend well to this sort of interface.
If all you have is WiFi- or cell-tower-based location, then you're not going to be able to get enough precision to make the value meaningful.
Chrome 40.0.2214.111 on Yosemite. Not really cross-browser when its not working in newest Chrome ...
Edit: tried it on iPhone, its working but orientation is reversed. For example I turn to North, turn left 90 deg and instead of showing West, its showing East.