Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Suggested improvements to documentation for "callback" and "skip" #651

@rickthepick

Description

@rickthepick
  1. In the documentation please explain how a script element in the array is triggered by the change in value of the "skip" expression. Are you periodically polling? Are you injecting a callback on each of the "callback"s and in the callback you are reevaluating all of the "skip" expressions? If we don't explain the mechanism it seems like magic and personally I didn't use this feature because I didn't understand how it works.

  2. Can we rename "skip" to maybe "wait"? I think "wait" captures the meaning that this expression will be reevaluated.

  3. Maybe have the example be something like this. Seems like this is the most common use case maybe? How about two examples?

script: [
        {
          src: "/js/partOne.js",
          hid: "partOne",
          callback: () => {
            this.readyForPartTwo = true;
          },
        },
        {
          src: "/js/partTwoRequiresPartOne.js",
          skip: !this.readyForPartTwo,
        },
],

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions