Chris@0: {% autoescape 'js' %} Chris@0: (function (xpath) { Chris@0: function getElement(xpath) { Chris@0: var polterAgent = window.__poltergeist; Chris@0: var ids = polterAgent.find("xpath", xpath, document); Chris@0: var polterNode = polterAgent.get(ids[0]); Chris@0: return polterNode.element; Chris@0: } Chris@0: Chris@0: var node = getElement(xpath); Chris@0: if(typeof node.selected == "undefined"){ Chris@0: return null; Chris@0: } Chris@0: return node.selected; Chris@0: }('{{xpath}}')); Chris@0: {% endautoescape %}