How to realize clipping mask?

Hello everyone,

how to judge the state of cut mask in uxp?
activeDocument.activeLayer.grouped

Hi, what do you want to achieve ?
Do you want to check if the current layer is a clipping mask, or is in a group ?

Hello,
I want to know whether the layer is a clipping mask through the code, similar to the function in CEP: return activeDocument.activeLayer.grouped

function isClipped(){
  return photoshop.action.batchPlay([
    {
      _obj: 'get',
      _target: [
        { _property: 'group' }, 
        { _ref: 'layer', _enum: 'ordinal', _value: 'targetEnum' }
      ],
    },
  ], { synchronousExecution: true })[0].group
}

This checks if the currently selected layer is “clipping down”.

Thank you very much. It works.