--TEST-- Test V8::executeString() : DOM object passed from PHP --SKIPIF-- --FILE-- loadXML(''); $elements = $dom->getElementsByTagName('node'); echo 'php: ', $elements->length, "\n"; $node = $elements->item(0); echo "hasChildNodes: "; var_dump($node->hasChildNodes()); echo "hasAttribute('class'): "; var_dump($node->hasAttribute('class')); //var_dump($node); $a = new V8Js(); $a->dom = $dom; $a->test = array( 'length' => 1 ); $a->executeString($JS, "test.js"); ?> ===EOF=== --EXPECT-- php: 1 hasChildNodes: bool(false) hasAttribute('class'): bool(true) js1: 1 js2: 1 hasChildNodes: bool(false) hasAttribute('class'): bool(true) ===EOF===