Angular2 Exception: TypeError el.createShadowRoot is not a function (Safari/Edge)

前端 未结 3 1875
半阙折子戏
半阙折子戏 2021-01-18 02:36

I have an angular2 app that works great in Chrome and Firefox, but in Safari I get this error:

TypeError el.createShadowRoot is not a function

3条回答
  •  独厮守ぢ
    2021-01-18 03:20

    if you are facing this issue in simple HTML file then below line of code can be helpful

    element.attachShadow({mode: 'open'})
    

提交回复
热议问题