SW개발/Javascript
tui-chart 개체가 'assign' 속성이나 메서드를 지원하지 않습니다.
개소왕
2020. 4. 6. 14:36
* 개요
Toast UI chart 사용시 Internet Explorer 에서 다음 오류 보이며 미작동
"개체가 'assign' 속성이나 메서드를 지원하지 않습니다."
#IE
* 원인
Object.assign 등 IE에서 지원하지 않는 EC6 문법이 tui-chart 에서 사용되기 때문.
assign 을
여기 나온 코드 추가 하면 해결 가능하겠지만
entries 등 다른 오류또 날것.
* 해결 1
https://okchangwon.tistory.com/3
해당 EC6 문법 지원해주는 babel polyfill 을 tui-chart 불러오기 전에 호출해주면 됨.
<script src="https://unpkg.com/core-js-bundle@3.1.4/index.js"></script>
<script src="https://unpkg.com/regenerator-runtime@0.13.3/runtime.js"></script>
# Polyfill : 특정 기능 지원 안 되는 브라우저를 위해 사용할 수 있는 코드 등
* 해결 2 - 사실 tui-chart-polyfill.js 가 있음.
<script src="https://uicdn.toast.com/tui.chart/latest/tui-chart-polyfill.js"></script>