Skip to content

Commit 3f3ad76

Browse files
committed
Refactor for IE11
IE11 doesn't support includes(). Falling back to indexOf.
1 parent aeb9c20 commit 3f3ad76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdfobject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234

235235
//Allow developer to insert custom attribute on embed/iframe element, but ensure it does not conflict with attributes used by PDFObject
236236
let reservedTokens = ["className", "type", "title", "src", "style", "id", "allow", "frameborder"];
237-
if(customAttribute && customAttribute.key && reservedTokens.every(function (token) { return !customAttribute.key.includes(token); })){
237+
if(customAttribute && customAttribute.key && reservedTokens.indexOf(customAttribute.key) === -1){
238238
el.setAttribute(customAttribute.key, (typeof customAttribute.value !== "undefined") ? customAttribute.value : "");
239239
}
240240

0 commit comments

Comments
 (0)