-
Notifications
You must be signed in to change notification settings - Fork 190
feat: timers in plugins #1452
feat: timers in plugins #1452
Conversation
Thanks for submitting this pull request! A maintainer will review this in the next few days and explicitly select labels so you know what's going on. If no reviewer appears after a week, a reminder will be sent out. |
Codecov Report
@@ Coverage Diff @@
## develop #1452 +/- ##
===========================================
+ Coverage 40.86% 41.41% +0.54%
===========================================
Files 237 237
Lines 6585 6616 +31
Branches 1298 1306 +8
===========================================
+ Hits 2691 2740 +49
+ Misses 3651 3645 -6
+ Partials 243 231 -12
Continue to review full report at Codecov.
|
Your pull request needs some changes. Please wait for a comment from one of our developers for more information. |
A member has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution! |
Your pull request has been merged and marked as tier 4. It will earn you $20 USD. |
Resolves #1446 by implementing a
TIMERS
permission that exposesclearInterval
,clearTimeout
,setInterval
andsetTimeout
.It uses internal arrays to store the IDs of any timeouts and intervals to make sure they are all cleared once the route navigation changes and it also works with nested timers. A watchdog object is used to keep track of pending timeouts so they are immediately removed from the array once executed in order to prevent excessive memory usage that could potentially arise by repeatedly executing timeouts. The IDs are also removed from their respective arrays when
clearInterval
orclearTimeout
are called. It also includes appropriate tests.The reason for adding the feature was outlined in #1446.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR release a new version?
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
develop
branch, not themaster
branchIf adding a new feature, the PR's description includes: