Deleting Layer Contents

Hello,
I have a layer selected, run a Select > All command, and tried executing this function, but nothing happens:

async function clear()
{
  const result = await batchPlay(
  [
    {
     "_obj": "delete",
     "_isCommand": true
    }
  ],{
     "synchronousExecution": false
  });
}

batchPlay is working for other Photoshop commands that I’ve gotten from eventNotifier. Can anyone help me understand what’s going wrong, please? Thank you.

If I add a Select descriptor before the Delete descriptor, it works.

Here is the code (with a Deselect descriptor at the end):

async function clear()
{
  const result = await batchPlay(
  [
     {
        "_obj": "set",
        "_target": [
           {
              "_ref": "channel",
              "_property": "selection"
           }
        ],
        "to": {
           "_enum": "ordinal",
           "_value": "allEnum"
        }
     },
     {
       "_obj": "delete",
     },
     {
        "_obj": "set",
        "_target": [
           {
              "_ref": "channel",
              "_property": "selection"
           }
        ],
        "to": {
           "_enum": "ordinal",
           "_value": "none"
        }
     }
  ],{
     "synchronousExecution": false
  });
}

It’s strange that the Edit > Clear command event doesn’t include “_target” information.