В сценарии JS Edge выдает ошибку 5002 Функция, ожидаемая при объявлении поля объекта - PullRequest
0 голосов
/ 24 апреля 2019

В довольно простую HTML-страницу я добавил скрипт. Это прекрасно работает с FF и Chrome, а не с Edge или IE. В то время как проблема IE у меня может стоять некоторое время, я бы скорее нашел решение для Edge. Edge выбрасывает указанную ошибку в этой строке pageQueryInput: document.getElementById('pageQueryInput'),

в то время как вся часть кода выглядит так:



function renderBooks(){
console.log('render');
console.log(document.getElementById('booksContainer'));
console.log(document.getElementById('pageQueryInput'));
// myPage  creates variable storing some important nodes that are built with HTML (and not rendered by this function )and therefore can be determined immy after load event
const myPage ={ 
    booksContainer: document.getElementById('booksContainer'),
    pageQueryInput: document.getElementById('pageQueryInput'),
    radio:  [...(document.getElementById('radioInputs')).getElementsByTagName('input')],//xxxxxxxxxx
    noBooksScreen: document.getElementById('noBooksModal'),
    noBooksScreenContent: document.getElementById('noBooksModal-content'),
    noBooksScreenCloseButton: document.getElementById('closeNoBooksScreen'),
    form: document.getElementById('queryForm'),
    resetButton: document.getElementById('resetButton'),
    }```

That is just beginning of the function so the main brace is not locked. The code is more than simply. I have found some similar questions but none of such the simply case. Could someone have a look?

...