Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 反应,<;使用>。。xlinkHref不再适用于Chrome v71_Javascript_Reactjs_Google Chrome_Svg_Shadow Dom - Fatal编程技术网

Javascript 反应,<;使用>。。xlinkHref不再适用于Chrome v71

Javascript 反应,<;使用>。。xlinkHref不再适用于Chrome v71,javascript,reactjs,google-chrome,svg,shadow-dom,Javascript,Reactjs,Google Chrome,Svg,Shadow Dom,我有一个反应SVG组件,在过去的一年中一直运行良好。。。在我的SVG组件中,我有这样一个标记: <use innerRef={(ref) => { this.arcRef.icon = ref; }} xlinkHref={this.props.xlinkHref} width="10" height="10" x="240.462" y="138" /> {this.arcRef.ico

我有一个反应SVG组件,在过去的一年中一直运行良好。。。在我的SVG组件中,我有这样一个标记:

    <use
      innerRef={(ref) => { this.arcRef.icon = ref; }}
      xlinkHref={this.props.xlinkHref}
      width="10"
      height="10"
      x="240.462"
      y="138"
    />
{this.arcRef.icon=ref;}
xlinkHref={this.props.xlinkHref}
宽度=“10”
高度=“10”
x=“240.462”
y=“138”
/>
这是在dom中呈现的,如下所示:

<use class="sc-dTLGrV fEJmAu" href="#item-2" width="40px" height="40px" x="240.462" y="138" data-svg-origin="240.462 138" transform="matrix(1,0,0,1,38,-26.5)" style="opacity: 1;"></use>

Chrome最近更新到了v71,现在已经不起作用了。在文章中,它提到“Chrome71已更新为支持ShadowDomV1规范”

在DOM中,我在
标记中看到以下内容:

#阴影根(闭合)

我相信use再也找不到页面上的
#item-2
元素了,即使它在那里


关于如何让它重新工作,有什么想法吗?

我也有同样的问题,因为我的ID有冲突。
它以前适用于所有Chrome版本,但不适用于71


尝试解决这些冲突(如果有)。

什么是
#第2项
?请提供一个答案。@reviewers,这个答案虽然远不完美,但确实试图回答这个问题。投票结束该问题,因为该问题缺少MCVE。