Use dataurl instead of eval