We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outerHTML
I've hit quite a strange behavior of Idiomorph.morph, namely:
Idiomorph.morph
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test</title> <script src="https://unpkg.com/[email protected]"></script> </head> <body> <div id="schorle-page"> <div id="sle-000"> <button id="me">Click me</button> </div> </div> <script> btn = document.getElementById('me'); newPayload = ` <div id="sle-000"> <button id="me">${Math.random()}</button> </div>`; console.log(`Script loaded`); btn.addEventListener('click', function() { const node = document.getElementById('sle-000'); console.log('Node to be morphed', node); console.log('New payload', newPayload); Idiomorph.morph(node, newPayload, {ignoreActiveValue: true, morphStyle: 'outerHTML'}); console.log('Node after morph', node); }); </script> </body> </html>
I would expect the text of the button to be updated, but nothing happens. Am I missing something?
The text was updated successfully, but these errors were encountered:
Example on stackblitz - https://stackblitz.com/edit/stackblitz-starters-ved28x?file=index.html
Sorry, something went wrong.
When I run your example on Stackblitz in Chrome it morphs as expected. Is it now working for you?
No branches or pull requests
I've hit quite a strange behavior of
Idiomorph.morph
, namely:I would expect the text of the button to be updated, but nothing happens. Am I missing something?
The text was updated successfully, but these errors were encountered: