Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jashkenas/underscore
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: h/underscore
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 9 files changed
  • 1 contributor

Commits on Aug 7, 2023

  1. Run debounce callback if browser tab is closed

    A common issue with debounced API calls is that when the user closes the
    browser tab, the debounced function may not have run yet. This is a
    frequent cause of data loss. The debounce implementation now prevents
    this issue by running the trailing debounce immediately if the tab is
    closed prior to the trailing timeout.
    
    The code detects whether it's running in an environment with access to
    `document.addEventListener()`. In runtimes where this function is
    unavailable (e.g. Node.js) the new functionality is ignored since would
    not be relevant in that context.
    h committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    fd16d98 View commit details
    Browse the repository at this point in the history
Loading