/************************************************************* * * Copyright (c) 2018-2025 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * This is the code run by the webworkers in the iframe. * It can load content from the CDN since the iframe runs from there. * You can add importScripts() commands at the top to preload libraries * or a Task can run the "import" action to load libraries on the fly. * * The actions that can be run are listed in the Commands variable, and * imported scripts can add to that object to make more commands available. * If you want to pre-load libraries that add commands, they should be * imported at the bottom of this file using importScripts(). */ /** * Don't want to use imports for these, since this is compiled separately * with different parameters, and that would cause the imported files * to be compiled with those parameters. */ type OptionList = { [name: string]: any; }; type Message = { [key: string]: any; }; type WorkerResult = Promise; type WorkerFunction = (data: Message) => WorkerResult; declare let global: any; declare const SRE: any;