An active selection is a property of the file, not of a Layer.
»activeDocument« is no property of Layer, either, so
makes no sense.
And even if you remove »artset.« you still miss the brackets.
If you bothered to consult ESTK’s Object Model Viewer you could verify which Properties and Methods exist for an Object (see screenshot for an example for »Layer«).
Most people use "docRef" to refer to app.activeDocument, rather than writing that out all the time. So to select all, you would really only need:
var docRef = activeDocument;
The scripting guides says you can exclude app.document, in this case the word app. Up to this point I haven't dropped the app word when I code.
But do you understand why
It worked. Too much calling the app.document repeatedly.
What if I placed the 'artset' in a function, and I call the function later in the script, could I still use the .parent properties or no because it's no longer the parent ?