GitXplorerGitXplorer
G

browser-equivalence-edge-case

public
4 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
beb384733bd771a4033ca0294620f25d4e659507

Merge pull request #1 from mathiasbynens/patch-1

GGeoffreyBooth committed 7 years ago
Unverified
6820ffb80447e8f5b885f98f6597f60f0b8a52f8

Keep full messages, so we match the README

GGeoffreyBooth committed 7 years ago
Verified
455bf276881e83856d79a99b0254dd65f7ae004f

Simplify ambiguous example

mmathiasbynens committed 7 years ago
Unverified
0f3ac5d1677780b46df2b6447a797417cacddb03

Initial commit

GGeoffreyBooth committed 7 years ago

README

The README file for this repository.

import Browser Equivalence Edge Case

This repo is a demonstration of an edge case in how JavaScript import behaves in Node --experimental-modules versus browsers.

Test #1: Node

In a version of Node with --experimental-modules, such as 10.5.0, go to this repo and run:

node --experimental-modules index.mjs

You should see In sloppy mode printed.

Test #2: Chrome

Download http-server if you don’t have it already:

npm install --global http-server

Then run http-server from this repo:

http-server

You should see a message saying that the folder is now being served at an address. Go to that address in Chrome (tested in version 69).

You should see In strict mode printed.