Skip to content

Commit

Permalink
feat(client): remove Internet Explorer (IE11) support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: remove Internet Explorer (IE11) support

Internet Explorer has been retired on 2022-06-15

Closes #225
  • Loading branch information
remarkablemark committed Jun 18, 2022
1 parent c69dce5 commit b34cbe1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
8 changes: 1 addition & 7 deletions lib/client/domparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ if (typeof window.DOMParser === 'function') {
* @see https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument
*/
if (document.implementation) {
var isIE = require('./utilities').isIE;

// title parameter is required in IE
// https://msdn.microsoft.com/en-us/library/ff975457(v=vs.85).aspx
var doc = document.implementation.createHTMLDocument(
isIE() ? 'html-dom-parser' : undefined
);
var doc = document.implementation.createHTMLDocument();

/**
* Use HTML document created by `document.implementation.createHTMLDocument`.
Expand Down
7 changes: 0 additions & 7 deletions lib/client/utilities.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,3 @@ export function formatDOM(
parent?: Element | null,
directive?: string
): Array<Comment | Element | ProcessingInstruction | Text>;

/**
* Detects if browser is Internet Explorer.
*
* @return - Whether IE is detected.
*/
export function isIE(): boolean;
12 changes: 1 addition & 11 deletions lib/client/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,7 @@ function formatDOM(nodes, parent, directive) {
return result;
}

/**
* Detects if browser is Internet Explorer.
*
* @return {boolean} - Whether IE is detected.
*/
function isIE() {
return /(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent);
}

module.exports = {
formatAttributes: formatAttributes,
formatDOM: formatDOM,
isIE: isIE
formatDOM: formatDOM
};

0 comments on commit b34cbe1

Please sign in to comment.