@chialab/pdfjs-lib 1.0.0-alpha.40 → 1.0.0-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,6 +46,33 @@ if (!("try" in Promise)) {
|
|
|
46
46
|
enumerable: false
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
if (!URL.parse) {
|
|
50
|
+
Object.defineProperty(URL, "parse", {
|
|
51
|
+
enumerable: false,
|
|
52
|
+
value: function parse(input, base) {
|
|
53
|
+
try {
|
|
54
|
+
return new URL(input, base || globalThis.location && globalThis.location.href);
|
|
55
|
+
} catch (_) {
|
|
56
|
+
if (!globalThis.document || !globalThis.document.createElement) {
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
var a = globalThis.document.createElement("a");
|
|
60
|
+
a.href = base ? base + input : input;
|
|
61
|
+
return {
|
|
62
|
+
href: a.href,
|
|
63
|
+
protocol: a.protocol,
|
|
64
|
+
hostname: a.hostname,
|
|
65
|
+
host: a.host,
|
|
66
|
+
port: a.port,
|
|
67
|
+
pathname: a.pathname.charAt(0) === "/" ? a.pathname : "/" + a.pathname,
|
|
68
|
+
search: a.search,
|
|
69
|
+
hash: a.hash,
|
|
70
|
+
origin: a.origin || a.protocol + "//" + a.host
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
49
76
|
|
|
50
77
|
// src/pdf.js/src/shared/util.js
|
|
51
78
|
var isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser");
|
package/dist/browser/index.js
CHANGED
package/dist/browser/worker.js
CHANGED
|
@@ -58,6 +58,33 @@ if (!("try" in Promise)) {
|
|
|
58
58
|
enumerable: false
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
+
if (!URL.parse) {
|
|
62
|
+
Object.defineProperty(URL, "parse", {
|
|
63
|
+
enumerable: false,
|
|
64
|
+
value: function parse(input, base) {
|
|
65
|
+
try {
|
|
66
|
+
return new URL(input, base || globalThis.location && globalThis.location.href);
|
|
67
|
+
} catch (_) {
|
|
68
|
+
if (!globalThis.document || !globalThis.document.createElement) {
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
var a = globalThis.document.createElement("a");
|
|
72
|
+
a.href = base ? base + input : input;
|
|
73
|
+
return {
|
|
74
|
+
href: a.href,
|
|
75
|
+
protocol: a.protocol,
|
|
76
|
+
hostname: a.hostname,
|
|
77
|
+
host: a.host,
|
|
78
|
+
port: a.port,
|
|
79
|
+
pathname: a.pathname.charAt(0) === "/" ? a.pathname : "/" + a.pathname,
|
|
80
|
+
search: a.search,
|
|
81
|
+
hash: a.hash,
|
|
82
|
+
origin: a.origin || a.protocol + "//" + a.host
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
61
88
|
|
|
62
89
|
// src/pdf.js/src/shared/message_handler.js
|
|
63
90
|
var CallbackKind = {
|
package/dist/node/index.js
CHANGED
package/dist/node/worker.js
CHANGED
package/package.json
CHANGED