Turns out it was an error that occured while changing into the actual site (instead of the testing site).
On the actual site the dockPanel script would register to $(window).resize at the time beeing loaded, which was before jQuery was loaded.
In my testing environment, my dockPanel script would be loaded after the jquery part was already loaded, which made the immediate subscription to the window resize work.
var delayTimer = null;
function getDelayTimer() {
return delayTimer || (delayTimer = $.utility.delayTimer(dockPanelConstants.resizeTimerDelay));
}
(function () { <!--- fix
$(window).resize(function () {
getDelayTimer(function () {
for (var i = dockpanelResizeHandles.length - 1; i >= 0; i--) {
var dp = dockpanelResizeHandles[i];
dp.repaint();
}
});
});
}); <!--- fix