prova detta istället:
Kod:
var fix_height = function() {
var w = window.innerWidth;
var h = window.innerHeight;
var canvas_left_blue = document.getElementById('canvas_left_blue');
var canvas_right_yellow = document.getElementById('canvas_right_yellow');
canvas_left_blue.style.height = h + "px";
canvas_right_yellow.style.height = h + "px";
console.log(h);
}
window.onload = fix_height();
window.addEventListener('resize', function(event){
fix_height();
});
Fast jag håller med om att istället använda flexbox!