skatejs / web-components

[DEPRECATED] - The frictionless way to use the webcomponents/webcomponentsjs polyfills.
MIT License
17 stars 4 forks source link

missing/broken scope on shadydom callbacks #37

Closed micahscopes closed 7 years ago

micahscopes commented 7 years ago

Recently, I was hung up on a bug that was breaking basic event propagation in shadydoms. Callbacks were being called without binding the relevant context. I was using d3, which relies on this in callbacks. This bug was fixed in a very simple way here. But as you can see, that pull request has been sitting around for 2 months now (along with quite a few others).

Maybe consider using the cloudydom fork?

treshugart commented 7 years ago

@micahscopes lol, I was actually just talking with @matthewp about that. I think I will. It's easy to switch between them, if necessary. Happy to accept a PR for the change if you can manage one :)

micahscopes commented 7 years ago

When I try running npm install or npm prepublish for some reason I'm getting:

Executing pre-build scripts
sed: -e expression #1, char 1: unknown command: `"'
"window.customElements && eval(\`$(cat ./src/native-shim.js)\`);" > ./src/native-shim.js

/home/micah/Web/skatejs-web-components/node_modules/webpack-shell-plugin/lib/index.js:168
        throw error;
        ^

I was getting this error before I changed the dependencies. Not sure about it.

treshugart commented 7 years ago

You might need to update npm or something like that?

micahscopes commented 7 years ago

I've upgraded node and npm, but am still getting that error. It's hard for me to know what exactly it means, as I have always avoided learning sed!

Maybe this is relevant: http://stackoverflow.com/questions/8421314/bash-quote-behavior-and-sed

I'm working on debugging it.

treshugart commented 7 years ago

Hmm, I'm getting that when using npm. If you use yarn it works just fine (really odd)

micahscopes commented 7 years ago

Yup, yarn works for me.

micahscopes commented 7 years ago

Do you want the yarn lockfile too? Not sure why that's in there, but I've never used yarn before, so I don't want to assume anything. I suppose if anything, it serves as a kind of log.

matthewp commented 7 years ago

I'm happy to transfer the repo to a more neutral org (meaning not under my personal account) if anyone wants it.

treshugart commented 7 years ago

Just sent an invite for you to join the skatejs org @matthewp so you can transfer over. You should have access to transfer the repo, but let me know if not.

matthewp commented 7 years ago

Here it is! https://github.com/skatejs/cloudydom