Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8d275e6d
Commit
8d275e6d
authored
Jul 13, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move requestAnimationFrame fallback to own module
parent
b03b414c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+1
-5
app/assets/javascripts/lib/utils/request_animation_frame_fallback.js
...javascripts/lib/utils/request_animation_frame_fallback.js
+10
-0
No files found.
app/assets/javascripts/awards_handler.js
View file @
8d275e6d
...
...
@@ -10,14 +10,10 @@ import { isInVueNoteablePage } from './lib/utils/dom_utils';
import
flash
from
'
./flash
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
*
as
Emoji
from
'
~/emoji
'
;
import
requestAnimationFrame
from
'
~/lib/utils/request_animation_frame_fallback
'
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
const
transitionEndEventString
=
'
transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd
'
;
const
requestAnimationFrame
=
window
.
requestAnimationFrame
||
window
.
webkitRequestAnimationFrame
||
window
.
mozRequestAnimationFrame
||
window
.
setTimeout
;
const
FROM_SENTENCE_REGEX
=
/
(?:
, and | and |,
)
/
;
// For separating lists produced by ruby's Array#toSentence
...
...
app/assets/javascripts/lib/utils/request_animation_frame_fallback.js
0 → 100644
View file @
8d275e6d
/**
* DO NOT USE!
*
* This is a module meant to encapsulate a legacy bit of calculation so that it can
* be easily mocked in Jest to fix performance and degredation issues.
*/
export
default
window
.
requestAnimationFrame
||
window
.
webkitRequestAnimationFrame
||
window
.
mozRequestAnimationFrame
||
window
.
setTimeout
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment