Add a script node for accessing the current selector.

This still needs tests, docs, and possibly some support functions.