在web_sys lib中-使用方法名称`replace_with_with_node`的原因

时间:2020-10-17 19:26:50

标签: wasm-bindgen

web_sys库中的Dom元素具有js方法 https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/replaceWith

https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Element.html#method.replace_with_with_node

例如append_withbefore_withprepend_with没有这双_with

使用replace_with_node签名不会与其他replace方法冲突。

为什么要加倍_with

0 个答案:

没有答案