if (obj instanceof IPathElement) {
if (obj != null && app.getPrototypeName(obj) != null) {
        public Scriptable wrapNewObject(Context cx, Scriptable scope, Object obj) {            // System.err.println ("N-Wrapping: "+obj);            if (obj instanceof INode) {                return getNodeWrapper((INode) obj);            }            if (obj instanceof IPathElement) {                return getElementWrapper(obj);            }            return super.wrapNewObject(cx, scope, obj);        }