uniapp,h5

1234567891011121314151617181920212223
  1. export const nextTick = (() => {
  2. const isPromiseAvailable = typeof Promise === "function" && typeof Promise.resolve === "function";
  3. if (isPromiseAvailable) {
  4. return (cb) => Promise.resolve().then(cb);
  5. }
  6. else {
  7. return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);
  8. }
  9. })();
  10. export const globalThisShim = (() => {
  11. if (typeof self !== "undefined") {
  12. return self;
  13. }
  14. else if (typeof window !== "undefined") {
  15. return window;
  16. }
  17. else {
  18. return Function("return this")();
  19. }
  20. })();
  21. export const defaultBinaryType = "arraybuffer";
  22. export function createCookieJar() { }