Open floribon opened 5 years ago
@floribon Do npm install web-animations-js Then include after webcomponents-loader in the html file.
@aravindnc ideally I wouldn't change the containing HTML page as I'm only producing a JS file of my web component.
So there is no way for it to be self contained? (except for webcomponents-loader which make sense to be an external file for polyfils)
If you're only producing a JS file of your web component, you should be able to just import that JS file.
(In Rails importing web-animations-next-lite
in application.js
worked for me.)
$ yarn add web-animations-js
import 'web-animations-js/web-animations-next-lite.min';
@mnd-dsgn thanks, I tried that but when I import that file I get a
TypeError: Cannot set property 'true' of undefined
This is because that script uses a global this
which in my case is some webpack internals. Replacing this
with window
in web-animations-next-lite seems to fix the problem.
Would that qualify for a bug? No other dependencies that I've seen relies on a global this
.
This is because that script uses a global
this
which in my case is some webpack internals. Replacingthis
withwindow
in web-animations-next-lite seems to fix the problem.
Would the allowTopLevelThis
from babel-plugin-transform-modules-commonjs ? Not ideal....
Solutions above didnt work for me. Turned the animations off and wrote my own stuff. If that could also work for you just opt-out using the no-animations attribute <paper-dropdown-menu label="..." no-animations>
I'm getting this error even when using the exact same HTML as given in the demo:
When I click on the dropdown:
Using Polymer 3, in particular:
@polymer/polymer: ^3.1.0 @polymer/paper-dropdown-menu: 3.0.1
Is there any workaround to have this working? Where is KeyframeEffect defined? Thanks
Note that I don't need any specific transition, just the default look and feel of paper-dropdown.
Browsers Affected