Closed Blog404DE closed 5 years ago
After testing this Contao extension i’ve seen some problems with IE10:
One problem is the following javascript-error: IE10 - Script 5007: Unable to get property 'cookiebar' of undefined or null reference
It seems to be raised by the following line (Line 9): var cookieName = cookiebar.dataset.cookiebar;
var cookieName = cookiebar.dataset.cookiebar;
After debugging a bit, it seem’s that cookiebar.dataset is undefined, because the dataset-property is only supported by IE11 and older (Reference)
On IE10, you have to explicit get the attributes like: xyz.getAttribute('data-cookiebar‘)
The same change is needed on line 33: var ttl = cookiebar.dataset.cookiebarTtl ? parseInt(cookiebar.dataset.cookiebarTtl, 10) : 365;
var ttl = cookiebar.dataset.cookiebarTtl ? parseInt(cookiebar.dataset.cookiebarTtl, 10) : 365;
But even with this 2 smaller changes, the Cookiebar didn’t show up. There must be another IE10-compatibility-bug :-(
Sorry but IE10 is dead and will not be supported by this extension.
After testing this Contao extension i’ve seen some problems with IE10:
One problem is the following javascript-error: IE10 - Script 5007: Unable to get property 'cookiebar' of undefined or null reference
It seems to be raised by the following line (Line 9):
var cookieName = cookiebar.dataset.cookiebar;
After debugging a bit, it seem’s that cookiebar.dataset is undefined, because the dataset-property is only supported by IE11 and older (Reference)
On IE10, you have to explicit get the attributes like: xyz.getAttribute('data-cookiebar‘)
The same change is needed on line 33:
var ttl = cookiebar.dataset.cookiebarTtl ? parseInt(cookiebar.dataset.cookiebarTtl, 10) : 365;
But even with this 2 smaller changes, the Cookiebar didn’t show up. There must be another IE10-compatibility-bug :-(