Skip to content

didRetain() instead of result.sels #46

Closed

Description

@leeoniya

i never quite liked the naming of result.sels or that it gets accumulated regardless of whether the user asked for it or not. it also doesnt feel right that whitelist accumulation uses this return style but whitelist testing uses the shouldDrop() callback style. didRetain() which fires for every undropped selector feels more consistent.

this would be a breaking change but to a non-primary API, so i dont think a 2.0 is warranted; hopefully no-one's life depends on dropcss 😱

Activity

  1. added
    enhancement
    on Apr 18, 2020
  2. added a commit that references this issue on Apr 29, 2020
    fd9b383
  3. eemeli commented on Jul 20, 2020

    @eemeli

    I noticed this change while refactoring some code. Dropping sels would for us cause things to break stuff. This API is also documented in the README's example code.

    I'd recommend you either bump the version to 2.0, or add the new API in parallel with the old.

  4. leeoniya commented on Jul 26, 2020

    @leeoniya
    OwnerAuthor

    yes, i'll likely bump it to 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions