Title: Proposal: declaring rate-limited event handlers (debounce, throttle) · Issue #1773 · angular/angular · GitHub
Open Graph Title: Proposal: declaring rate-limited event handlers (debounce, throttle) · Issue #1773 · angular/angular
X Title: Proposal: declaring rate-limited event handlers (debounce, throttle) · Issue #1773 · angular/angular
Description: It's very common to need to rate-limit DOM events that fire too quickly, such as scroll or mousemove for performance reasons. In the ES5 world, it is very easy to create this kind of handler. For example, if you were using underscore: Open Graph Description: It's very common to need to rate-limit DOM events that fire too quickly, such as scroll or mousemove for performance reasons. In the ES5 world, it is very easy to create this kind of handler. For e...
X Description: It's very common to need to rate-limit DOM events that fire too quickly, such as scroll or mousemove for performance reasons. In the ES5 world, it is very easy to create this kind of handler. F...
Mail addresses
Opengraph URL: https://github.com/angular/angular/issues/1773
X: @github
Domain: github.com
Links:
Viewport: width=device-width
notifications@github.com
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: declaring rate-limited event handlers (debounce, throttle)","articleBody":"It's very common to need to rate-limit DOM events that fire too quickly, such as `scroll` or `mousemove` for performance reasons. In the ES5 world, it is very easy to create this kind of handler. For example, if you were using underscore:\n\n``` html\n\u003cwidget (movemove)=\"checkHoverPosition($event)\">\n```\n\n``` js\nWidget.prototype.checkHoverPosition = _.debounce(function(event) {\n // ...\n}, 300);\n```\n\nHowever, in ES6 / TypeScript, the `class` syntax does not have a way to define a method based on the output of some function like this. You can still use the ES5 syntax, but that totally kills the hip vibe. Not to mention that this doesn't work for Dart at all.\n\nWe could solve this by introducing rate-limiters (or any of kind of similar function) for event handlers into Angular itself with a syntax something like:\n\n``` html\n\u003cwidget (movemove)=\"checkHoverPosition($event) | debounce:300\">\n\u003cwidget (movemove)=\"checkHoverPosition($event) | throttle:300\">\n```\n\nThese rate-limiters are needed by the material components, so it's only a question of whether Angular will support them directly or if the components have to roll our own rate limiting.\n","author":{"url":"https://github.com/jelbourn","@type":"Person","name":"jelbourn"},"datePublished":"2015-05-08T22:47:29Z","url":"https://github.com/angular/angular/issues/1773"}
react-profiling 0 react-import-map react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:fd10eaee-a9b0-d30f-326c-ceb811c72304 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id CF38:7A60E:1D19437:254B4B7:6B015297 html-safe-nonce 2d468bb0443ccd072b182bc2f58cf08d61c87e717acdae47350621c405f462fc visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjM4OjdBNjBFOjFEMTk0Mzc6MjU0QjRCNzo2QjAxNTI5NyIsInZpc2l0b3JfaWQiOiIxODU4ODQ3MDg4OTczNzg5NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac 0076e5bb2bafc9c40958ec65d4d8b82e499b89fe4c15633bf43b48d6fbc3046b hovercard-subject-tag issue:74521190 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/1773/issue_layout twitter:image https://opengraph.githubassets.com/a6fa586841e8e37280a85bc956a696dd885886a0bde4251818d8b412781732cb/angular/angular/issues/1773 twitter:card summary_large_image og:image https://opengraph.githubassets.com/a6fa586841e8e37280a85bc956a696dd885886a0bde4251818d8b412781732cb/angular/angular/issues/1773 og:image:alt It's very common to need to rate-limit DOM events that fire too quickly, such as scroll or mousemove for performance reasons. In the ES5 world, it is very easy to create this kind of handler. For e... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username jelbourn hostname github.com expected-hostname github.com None cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c turbo-cache-control no-preview go-import github.com/angular/angular git https://github.com/angular/angular.git octolytics-dimension-user_id 139426 octolytics-dimension-user_login angular octolytics-dimension-repository_id 24195339 octolytics-dimension-repository_nwo angular/angular octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 24195339 octolytics-dimension-repository_network_root_nwo angular/angular turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 8c77c9e8439031ad54c75a250694842892f693e1 ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
URLs of crawlers that visited me.