question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

params.html.cloneNode is not a function

See original GitHub issue

When 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:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
limontecommented, Jan 6, 2018

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:

0reactions
k9yoshcommented, Nov 6, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found