New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Can't include Correlation Header on IE can fail #1260 #1266
Conversation
[BUG] ajax.ts is using string trim() which is not supported on IE7/8 #1251
@@ -423,7 +423,8 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI { | |||
this._retryAt = null; | |||
} catch (e) { | |||
/* Ignore this error for IE under v10 */ | |||
if (!Util.getIEVersion() || Util.getIEVersion() > 9) { | |||
let ieVer = Util.getIEVersion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using local var to save space for minification.
return (myNav.indexOf('msie') !== -1) ? parseInt(myNav.split('msie')[1]) : null; | ||
if (myNav.indexOf("msie") !== -1) { | ||
return parseInt(myNav.split("msie")[1]); | ||
} else if (myNav.indexOf("trident/")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding trident as not all IE userAgents always include MSIE
|
||
public static parseUrl(url: string): HTMLAnchorElement { | ||
if (!UrlHelper.htmlAnchorElement) { | ||
UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : { host: UrlHelper.parseHost(url) }; // fill host field in the fallback case as that is the only externally required field from this fn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a test error with just using the single instance which caused the tests to occasionally fail -- as the used value kept getting overwritten.
errorMsg: "[%funcName%] is not supported in an ES3 environment, use CoreUtils.toISOString()", | ||
ignoreFuncMatch: [ | ||
"CoreUtils.toISOString", // Make sure this isn't a reference to CoreUtils.isISOString() | ||
"Utils.toISOString" // or if it's a reference to Utils.isISOString() | ||
/CoreUtils(\$[\d]+)+\.toISOString/, // Make sure this isn't a reference to CoreUtils.isISOString(); CoreUtils$1.isISOString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating this to support an issue that Xiao was having while attempt to update the version of TypeScript which caused the CoreUtils reference to become CoreUtils$0.toISOString()
@@ -190,6 +190,14 @@ export const defaultEs3CheckTokens:IEs3CheckKeyword[] = [ | |||
{ | |||
funcNames: [ /[\s\(,][gs]et[\s]+([\w]+)[\s]*\(\)[\s]*\{/g ], | |||
errorMsg: "[%funcName%] is not supported in an ES3 environment." | |||
}, | |||
{ | |||
funcNames: [ /([\w0-9]*)\.(trim)[\s]*\(/g ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add check for string trim() which is not supported on ES3
[BUG] ajax.ts is using string trim() which is not supported on IE7/8 #1251