diff --git a/cssbeautify.js b/cssbeautify.js index b4ae096..e5a7dfb 100644 --- a/cssbeautify.js +++ b/cssbeautify.js @@ -464,6 +464,9 @@ } else if (typeof window === 'object') { // Browser loading. window.cssbeautify = cssbeautify; + } else if (self instanceof WorkerGlobalScope) { + // Web worker. + self.cssbeautify = cssbeautify; } }());