| <html> |
| <import src="/sky/framework/inspector/dom-agent.sky" as="DOMAgent" /> |
| <div></div> |
| <script> |
| // FIXME: This shows a bug in our DOM mutation handling, we should |
| // only get one childNodeInserted record here, but we get two, which |
| // means the inspector shows two nodes where it should only show one. |
| |
| // setTimeout to flush pending DOM modifications and measure |
| // only the changes we want to. |
| setTimeout(function() { |
| var delegate = { |
| sendMessage: function(message, params) { |
| console.log(message); |
| if (params.node) |
| console.log(params.node.nodeId); |
| if (params.node && params.node.children) |
| console.log(params.node.children[0].nodeId); |
| } |
| }; |
| |
| var domAgent = new DOMAgent(delegate); |
| domAgent.enable(); |
| |
| var adding = document.createElement('adding'); |
| document.querySelector('div').appendChild(adding); |
| adding.textContent = 'adding'; |
| |
| setTimeout(function() { |
| internals.notifyTestComplete(internals.contentAsText()); |
| }); |
| }); |
| </script> |
| </html> |