You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that requires manipulating DOM to simplify HTML. One example of a transform is removing all nested <div> to the innermost <div> element.
but I quickly realized I'm not augmenting node, therefore i get the wrong behavior. I saw implemented internally of Node there was a .replace function. Is it possible to do replace current NodeRef with it's direct child?
The text was updated successfully, but these errors were encountered:
I'm working on a project that requires manipulating DOM to simplify HTML. One example of a transform is removing all nested
<div>
to the innermost<div>
element.My first attempt was to do the following
but I quickly realized I'm not augmenting node, therefore i get the wrong behavior. I saw implemented internally of
Node
there was a.replace
function. Is it possible to do replace current NodeRef with it's direct child?The text was updated successfully, but these errors were encountered: