I have an application with knockout.js
In IE 11 I get error
SCRIPT5022: WrongDocumentError
I have tried to find the reason of this issue. After some time I think it can be due to BOM (Byte order mark) as this symbol is returned in knockout views/html files.
<div class="container-fluid explore">
...
</div>
So am I right about BOM and error? If yes, how to disable it from my views? I tried to save some views without encoding, but seems it doesn't help.
I'm using VS2017.
It's kinda my call stack where I can go to current/errored place https://prnt.sc/qxgj6b
UPD:
Finally, I managed to find place where this exception is raised.
So basically in knockout is possible to create custom components. They can look like custom html tags with some data as passed params.
my-dropdown
is my custom component, that should be "translated" into next html:
<select class="my-dropdown" data-bind="options: data, optionsText: optionText, optionsValue: optionValue, value: selectedValue">
In knockout this "translation" is made in next way (if I correctly understood it):
b.appendChild(c[d])
where b
- is [object HTMLUnknownElement]
that represent my custom component in html file <my-dropdown>...</my-dropdown>
c[d] - is [object HTMLSelectElement]
that is my "translation" of component <select>...</select>
So on .appendChild
error is thrown.