File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ function domToReact(nodes, options) {
6262 }
6363
6464 props = node . attribs ;
65- if ( ! shouldPassAttributesUnaltered ( node ) ) {
65+ if ( ! skipAttributesToProps ( node ) ) {
6666 props = attributesToProps ( node . attribs ) ;
6767 }
6868
@@ -109,12 +109,13 @@ function domToReact(nodes, options) {
109109}
110110
111111/**
112- * Determines whether attributes should be altered or not.
112+ * Determines whether DOM element attributes should be transformed to props.
113+ * Web Components (custom elements) should not have their attributes transformed.
113114 *
114- * @param { React.ReactElement } node
115- * @return {Boolean }
115+ * @param { DomElement } node
116+ * @return {boolean }
116117 */
117- function shouldPassAttributesUnaltered ( node ) {
118+ function skipAttributesToProps ( node ) {
118119 return (
119120 utilities . PRESERVE_CUSTOM_ATTRIBUTES &&
120121 node . type === 'tag' &&
You can’t perform that action at this time.
0 commit comments