ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ui.util.debounce
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি ফাংশনকে এটিকে কল করার অনুমতি দেওয়ার জন্য মোড়ানো হয়, যতক্ষণ না তারা একটি নির্দিষ্ট ব্যবধানের চেয়ে কম ফায়ার করা হয় (মিলিসেকেন্ডে)। এটি একটি ব্যয়বহুল ফাংশনের আহ্বানের সংখ্যা কমাতে ব্যবহার করা যেতে পারে যখন এটি শেষ পর্যন্ত চলে তা নিশ্চিত করে।
উদাহরণ ব্যবহার: একটি ui.Checkbox এ একটি পরিবর্তন ইভেন্টে কলব্যাকের জন্য। ব্যবহারকারী বারবার চেকবক্সে ক্লিক করলে, চেকবক্সের শেষ ক্লিকেই কলব্যাক চলবে।
ডিবাউন্সড ফাংশন রিটার্ন করে।
ব্যবহার | রিটার্নস | ui.util.debounce(func, delay, scope ) | ফাংশন |
যুক্তি | টাইপ | বিস্তারিত | func | ফাংশন | ফাংশন debounce. |
delay | সংখ্যা | ফাংশনটি একবার কল করার পরে, ফাংশনটি চালানোর অনুমতি দেওয়ার আগে ফাংশনটির একটি অতিরিক্ত আহ্বানের জন্য বিলম্ব করতে মিলিসেকেন্ডের সংখ্যা। |
scope | বস্তু, ঐচ্ছিক | অবজেক্ট যার সুযোগে ফাংশন কল করতে হবে। |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eDebounces a function, limiting its execution to at most once within a specified time interval, even with repeated calls.\u003c/p\u003e\n"],["\u003cp\u003eUseful for optimizing expensive functions triggered by frequent events, ensuring only the last call within the interval is executed.\u003c/p\u003e\n"],["\u003cp\u003eReturns a debounced version of the original function, which can be called directly.\u003c/p\u003e\n"],["\u003cp\u003eCustomizable with parameters like \u003ccode\u003edelay\u003c/code\u003e for setting the debounce interval and \u003ccode\u003escope\u003c/code\u003e for controlling the function's execution context.\u003c/p\u003e\n"]]],[],null,["# ui.util.debounce\n\n\u003cbr /\u003e\n\nWraps a function to allow it to be called, at most, once for each sequence of calls fired repeatedly so long as they are fired less than a specified interval apart (in milliseconds). This can be used to reduce the number of invocations of an expensive function while ensuring it eventually runs.\n\n\u003cbr /\u003e\n\nExample use: For the callback to a change event on a ui.Checkbox. If the user clicks the checkbox repeatedly, only the last click of the checkbox will run the callback.\n\nReturns the debounced function.\n\n| Usage | Returns |\n|--------------------------------------------|----------|\n| `ui.util.debounce(func, delay, `*scope*`)` | Function |\n\n| Argument | Type | Details |\n|----------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| `func` | Function | The function to debounce. |\n| `delay` | Number | After the function is called once, the number of milliseconds to delay for an additional invocation of the function before allowing it to run. |\n| `scope` | Object, optional | Object in whose scope to call the function. |"]]