driver.js icon indicating copy to clipboard operation
driver.js copied to clipboard

Allow element to be type function that returns an element

Open richie-south opened this issue 1 year ago • 1 comments

Adding option to use element as function that returns an element. This makes it possible to have steps that selects elements that might not on be selectable right now but will be later on.

usage:

const driverObj = driver({
  animate: true,
  steps: [
    {
      element: () => document.querySelector(".page-header"),
      popover: {
        title: "",
        description:"",
      },
    }
  ]
});

driverObj.drive();

richie-south avatar Dec 21 '23 13:12 richie-south