You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 9, 2021. It is now read-only.
# use much faster jsdom mode instead of headless Chrome
59
-
glyphhanger ./test.html --jsdom
60
-
61
58
# Show version
62
59
glyphhanger --version
63
60
@@ -212,14 +209,22 @@ Limit results to text inside of elements that match a CSS selector
212
209
glyphhanger ./test.html --cssSelector="pre, #header, .popUp". If paired with `--onlyVisible`, it will only return elements that are both visible and match the selector
213
210
```
214
211
215
-
### Advanced: use `jsdom` Mode ⚠️
212
+
### Advanced: `jsdom` Mode ⚠️
216
213
217
214
JSDOM mode can be useful running against static pages that don’t use a lot of JavaScript generated content. While JSDOM mode can handle some JavaScript generated content, Puppeteer mode should be the safest method for most use cases.
218
215
219
216
JSDOM mode will also be much faster when running against files on a local filesystem rather than URL targets.
220
217
221
218
Read more about [the difference between JSDOM and a full headless browser](https://github.com/jsdom/jsdom/wiki/jsdom-vs.-PhantomJS) (like the default mode that glyphhanger uses: Puppeteer/headless Chrome).
222
219
220
+
```sh
221
+
# use faster jsdom mode instead of headless Chrome
222
+
glyphhanger ./test.html --jsdom
223
+
224
+
# jsdom mode works with standard input too
225
+
echo"this is a test"| glyphhanger ./test.html --jsdom
226
+
```
227
+
223
228
## Troubleshooting
224
229
225
230
*`glyphhanger` uses Puppeteer, the headless Chrome browser. Check out the [Puppeteer Troubleshooting documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch).
0 commit comments