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

Need help i dont understand #229

Open
wants to merge 439 commits into
base: branch2.0
Choose a base branch
from
Open

Need help i dont understand #229

wants to merge 439 commits into from

Conversation

mh-qureshi
Copy link

@mh-qureshi mh-qureshi commented Jun 20, 2021

No description provided.

dstoc and others added 30 commits March 29, 2016 11:01
Property names should be specified using camelCase, for example
backgroundColor instead of background-color.
Use of hyphens in property names is deprecated
Don't store Javascript functions on AnimationEffectTiming.easing or keyframe.easing
Matrix decomposition: support angle units grad and turn
Remove double call to normalizeTimingInput()
Throw TypeErrors on invalid inputs to AnimationEffectTiming
The polyfill evaluation of cubic Bezier timing functions
gives slightly different results than the native Blink
implementation.

In my testing, this change reduced the absolute error by 63%
while only increasing the number of cubic function evaluations
by 31%

This closes #139
The object-form-keyframes source file uses a call to Element.animate
to decide whether to load the polyfill for the object-form syntax.
If the native browser code supports Element.animate without full
support for object-form syntax, this test can throw a TypeError (see
#72). In
this case, the polyfill should proceed to load the polyfill. This
patch implements this behaviour with a try-catch guard around the
Element.animate loading check.
In response to review comments, this patch rewrites the test animation
in the object-form-keyframes load check, to be more definite that it
will leave the element opacity untouched regardless of the outcome.
Since the logic is now not obvious, a lengthy explanatory comment is
also added.
Add try-catch guard to object-form loading check
darrnshn and others added 30 commits July 27, 2017 08:22
The property _isFinished is readonly. cancel() should not attempt to
write to the property.

resolves #160
We make clear that old Chrome versions are not supported,
and mention the option of use a requestAnimationFrame polyfill.
`npm install`
was giving the warning
`npm WARN deprecated [email protected]: Please update to minimatch 3.0.2
or higher to avoid a RegExp DoS issue`

We avoid the warning by using a recent minimatch version.
Do not write to readonly _isFinished
Document that we require requestAnimationFrame
Currently, the semantics of [line 59 in `Gruntfile.js`](https://github.com/web-animations/web-animations-js/blob/ae52749433415fe979396bb82e7e5a0bdf9a115a/Gruntfile.js#L59) is - expose the library as a global called `true`. This causes two problems:

1. The wrapping mechanism of uglify breaks in strict mode (more below)
2. There's a leaking global variable called `true`

The used version of uglify wraps the code in the following construct:

```js
"(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")";
```

The IIFE passes the global `this` to a function and later tries to set the property name that we've assigned to `wrap`. This works fine in non-strict cases. The only side effect is the global `window.true` that we set to an empty object. In strict mode, however, global `this` equals to `undefined`. We try to set `undefined['true']` which cases a runtime error.

We noticed the above scenario after enabling differential loading with `script[type="module"]`, which uses strict mode by default.

It'll be fantastic if we can release the fix today, so we don't block the CLI release.

Side note, the wrap function of uglify is fixed for strict mode [here](https://github.com/mishoo/UglifyJS2/pull/1811/files#diff-da84828c4bd7834c0040b0bbb51acdec). Maybe update of `grunt` and `grunt-contrib-uglify` is worth it.
Fix the wrapping IIFE of the prod bundle
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

Successfully merging this pull request may close these issues.