Path: blob/trunk/third_party/closure/goog/bootstrap/webworkers.js
2868 views
// Copyright 2010 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview A bootstrap for dynamically requiring Closure within an HTML516* Web Worker context. To use this, first set CLOSURE_BASE_PATH to the directory17* containing base.js (relative to the main script), then use importScripts to18* load this file and base.js (in that order). After this you can use19* goog.require for further imports.20*21* @nocompile22*/232425/**26* Imports a script using the Web Worker importScript API.27*28* @param {string} src The script source.29* @return {boolean} True if the script was imported, false otherwise.30*/31this.CLOSURE_IMPORT_SCRIPT = (function(global) {32return function(src) {33global['importScripts'](src);34return true;35};36})(this);373839