|
@@ -8,7 +8,7 @@
|
|
|
export const {
|
|
|
Blob: BlobSafe,
|
|
|
CustomEvent: CustomEventSafe,
|
|
|
- Error: ErrorSafe,
|
|
|
+ Error, // for #/common e.g. in sendMessage
|
|
|
MouseEvent: MouseEventSafe,
|
|
|
Object, // for minification and guarding webpack Object(import) calls
|
|
|
Promise: PromiseSafe,
|
|
@@ -19,13 +19,14 @@ export const {
|
|
|
dispatchEvent: fire,
|
|
|
removeEventListener: off,
|
|
|
} = global;
|
|
|
+export const ErrorSafe = Error;
|
|
|
export const ResponseProto = Response[PROTO];
|
|
|
export const { hasOwnProperty, toString: objectToString } = {};
|
|
|
export const { apply, call } = hasOwnProperty;
|
|
|
export const safeCall = call.bind(call);
|
|
|
export const { forEach, includes, push } = [];
|
|
|
export const { createElementNS, getElementsByTagName } = document;
|
|
|
-export const { then } = Promise[PROTO];
|
|
|
+export const { then } = PromiseSafe[PROTO];
|
|
|
export const { charCodeAt, indexOf: stringIndexOf, slice } = '';
|
|
|
export const { append, appendChild, attachShadow, remove, setAttribute } = Element[PROTO];
|
|
|
export const {
|
|
@@ -41,5 +42,5 @@ export const { decode: tdDecode } = TextDecoderSafe[PROTO];
|
|
|
export const { get: getHref } = describeProperty(HTMLAnchorElement[PROTO], 'href');
|
|
|
export const getDetail = describeProperty(CustomEventSafe[PROTO], 'detail').get;
|
|
|
export const getRelatedTarget = describeProperty(MouseEventSafe[PROTO], 'relatedTarget').get;
|
|
|
-export const logging = assign({ __proto__: null }, console);
|
|
|
+export const logging = assign(createNullObj(), console);
|
|
|
export const IS_FIREFOX = !global.chrome.app;
|