add defensive code on cross domain. #FTDUEDTR-1426
canvasWidth add 'px' unit.