Assignment to read-only properties is not allowed in strict mode
Assignment to read-only properties is not allowed in strict mode
liam.a55
Posts: 1Questions: 1Answers: 0
$('#companyrolefeature_table').DataTable({
"paging": true,
"order": [[1, "asc"]],
"columnDefs": [{ "orderable": false, "targets": [0] }],
//Problems in IE
"lengthChange": false,
"dom": 't<"insertInput">lrip'
});
When viewing this table in IE/Edge I get the following error:
"Assignment to read-only properties is not allowed in strict mode"
occurs in:
_fnFeatureHtmlLength( settings) {
div[0].style = 'color:black';
}
and
_fnFeatureHtmlPaginate( settings){
node.style = 'color:black';
}
According to the error it can be resolved by setting cssText, which I have tested and it works:
.style.cssText = 'color:black'; instead which is to the ECMAScript5 standard.
Is there a way for me to override these functions, as I would prefer not to alter datatables.js.
This discussion has been closed.
Answers
In the DataTables code, neither of those functions (1, 2) actually sets a style at all.
Can you link to a page showing the issue please?
Allan