mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Adds/modifies examples for node.js and webpack.
This commit is contained in:
parent
9228e1ffcf
commit
79c2f69c32
15 changed files with 170 additions and 19 deletions
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals NetworkManager */
|
||||
/* globals NetworkManager, module */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -648,7 +648,8 @@ var workerConsole = {
|
|||
|
||||
|
||||
// Worker thread?
|
||||
if (typeof window === 'undefined' && typeof require === 'undefined') {
|
||||
if (typeof window === 'undefined' &&
|
||||
!(typeof module !== 'undefined' && module.require)) {
|
||||
if (!('console' in globalScope)) {
|
||||
globalScope.console = workerConsole;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue