params.html.cloneNode is not a function
See original GitHub issueWhen i use sweetalert using import swal from 'sweetalert'
it’s working fine. But when i try to use the same for sweetalert2 as import swal from 'sweetalert2'
it gives me the following error.
Uncaught TypeError: params.html.cloneNode is not a function sweetalert2.js?85ed:624
at setParameters (sweetalert2.js?85ed:624)
at sweetAlert (sweetalert2.js?85ed:946)
at VueComponent.openForm (CreateTodo.vue?603e:45)
at boundFn (vue.esm.js?65d7:179)
at HTMLButtonElement.invoker (vue.esm.js?65d7:1821)
setParameters @ sweetalert2.js?85ed:624
sweetAlert @ sweetalert2.js?85ed:946
openForm @ CreateTodo.vue?603e:45
boundFn @ vue.esm.js?65d7:179
invoker @ vue.esm.js?65d7:1821
Then i tried removing the module import and explicitly setting up the css and js in my html file, then sweetalert2.css is ignored. It’s overriden by another css. And when i add sweetalert.css, it is working fine. I tried changing the order of css files, but nothing happens.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Javascript cloneNode is not a function [duplicate]
cloneNode is a method of an HTMLElement , not of a NodeList . You have to call it on a single element: var...
Read more >TypeError: cloneNode is not a function in JavaScript
To solve the "cloneNode is not a function" error, make sure to only call the cloneNode method on valid DOM elements and place...
Read more >Node.cloneNode() - Web APIs - MDN Web Docs
Cloning a node copies all of its attributes and their values, including intrinsic (inline) listeners. It does not copy event listeners added ...
Read more >HTML : Javascript cloneNode is not a function - YouTube
HTML : Javascript cloneNode is not a function [ Beautify Your Computer : https://www.hows.tech/p/recommended. html ] HTML : Javascript ...
Read more >HTML DOM Element cloneNode Method - W3Schools
The cloneNode() method clones all attributes and their values. Set the deep parameter to true if you also want to clone descendants (children)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re using the code example from https://sweetalert.js.org/ which is a different project. The author of that project is careless about its users, that’s why I made SweetAlert2.
SweetAlert:
SweetAlert2:
@limonte Works like a charm… Thank you very much. I was referring to that site… Keep up the good work. It’s a really nice library.