Skip to content

Commit

Permalink
Turn off Prism’s web worker mode
Browse files Browse the repository at this point in the history
Closes GH-10.
Closes GH-12.
  • Loading branch information
otakustay authored and wooorm committed Aug 5, 2018
1 parent 2a0a7af commit e27d7f8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions core.js
@@ -1,13 +1,19 @@
'use strict'

/* global window */
/* global window, self */

var restore = capture()

/* istanbul ignore next - Don't allow Prism to run on page load in browser. */
var ctx = typeof window === 'undefined' ? {} : window
// istanbul ignore next - Don't allow Prism to run on page load in browser or
// to start messaging from workers.
var ctx =
typeof window === 'undefined'
? typeof self === 'undefined'
? {}
: self
: window

ctx.Prism = {manual: true}
ctx.Prism = {manual: true, disableWorkerMessageHandler: true}

/* Load all stuff in `prism.js` itself, except for
* `prism-file-highlight.js`.
Expand Down

0 comments on commit e27d7f8

Please sign in to comment.