Мне нужно преобразовать этот код Javascript в ClojureScript.У меня возникли проблемы с ключевым словом this
.
Вот мой JS:
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position) {
position = position || 0;
return this.indexOf(searchString, position) === position;
};
}
Я получаю ошибку Object doesn't support property or method 'startsWith'
с компилятором Google Closure в расширенном режиме, поэтомуМне нужно добавить этот код.(IE 11)