Skip to content
New issue

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

"Failed to execute 'selectNodeContents'" on 'Range': parameter 1 is not of type 'Node' #222

Open
Lomacar opened this issue Sep 14, 2021 · 2 comments

Comments

@Lomacar
Copy link

Lomacar commented Sep 14, 2021

Expected Behavior

Snuggsi should work and not die with an error when trying to run examples directly from the readme.

Current Behavior

I get an error

"Failed to execute 'selectNodeContents'" on 'Range': parameter 1 is not of type 'Node'

Possible Solution

No idea

Steps to Reprod(uce)

Well I have been trying all sorts of things. Running it on Codepen, creating a local file, running on a local server, downloading the snuggsi js. I was having issues getting it to work without saying "Template is not defined". But I got that sorted out, but I cannot get rid of this other error. Here is an example on Codepen which doesn't directly follow the readme examples, but gives the same error: https://codepen.io/lomacar/pen/rNwGYbN

Context

Just trying to use Snuggsi.

Your Environment

Any environment.

@born2discover
Copy link

I had a similar issue when trying out some examples on CodePen.
It'll work if you put brackets around Template invocation, like so:

  const template = Template(`snuggsi`);

It seems that the tagged template literals that are used in the examples, are not compatible with CodePen as I suspect the latter only expects the "classical" JavaScript.

@Lomacar
Copy link
Author

Lomacar commented May 31, 2022

Thanks. It works now. But I already went ahead and made my own web component system which I think is an improvement over snuggsi. https://github.com/Lomacar/Ewok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants