* @return a new TreeWalker
*/
public Object jsxFunction_createTreeWalker(final Node root, final int whatToShow, final Scriptable filter,
final boolean expandEntityReferences) throws DOMException {
NodeFilter filterWrapper = null;
if (filter != null) {
filterWrapper = new NodeFilter() {
private static final long serialVersionUID = -7572357836681155579L;
@Override
public short acceptNode(final Node n) {
final Object[] args = new Object[] {n};