You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This overwrites String.prototype.startsWith and breaks any code that expects a modern implementation to be present (like Office web add-ins or wherever this file gets loaded).
Issue
This implementation of String.prototype.startsWith doesn't support the position parameter, while all modern browsers do (it's also in here now: https://tc39.es/ecma262/#sec-string.prototype.startswith) - with the egregious bonus of not even checking whether a polyfill is even required.
Proposed solution
This polyfill should only be installed if String.prototype.startsWith does not exist.
The polyfill should implement a modern version with support for the position parameter (which would be functionally equivalent for code that uses it without anyway)
This overwrites
String.prototype.startsWith
and breaks any code that expects a modern implementation to be present (like Office web add-ins or wherever this file gets loaded).Issue
This implementation of
String.prototype.startsWith
doesn't support theposition
parameter, while all modern browsers do (it's also in here now: https://tc39.es/ecma262/#sec-string.prototype.startswith) - with the egregious bonus of not even checking whether a polyfill is even required.Proposed solution
String.prototype.startsWith
does not exist.position
parameter (which would be functionally equivalent for code that uses it without anyway)referencesource/System.Web.Extensions/Script/String.js
Line 19 in 51cf785
NB: I'm referring to this version of the file in the wild, please let me know if this is the wrong source repo
https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js
The text was updated successfully, but these errors were encountered: