Browse Source

Fixed example for universal usage (#33)

pull/30/merge
niftylettuce 5 years ago
committed by Luke Childs
parent
commit
82c7830c71
  1. 2
      README.md

2
README.md

@ -65,7 +65,7 @@ You can use a really simple pattern to enable your browser modules to run in Nod
```js ```js
function createTitle(text, win) { function createTitle(text, win) {
win = win || window; win = win || (typeof window === 'undefined' ? undefined : window);
const title = win.document.createElement('h1'); const title = win.document.createElement('h1');
title.innerHTML = text; title.innerHTML = text;

Loading…
Cancel
Save