OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 }, | 449 }, |
450 | 450 |
451 /** | 451 /** |
452 * @param {function(?Protocol.Error, !DOMAgent.NodeId=)=} callback | 452 * @param {function(?Protocol.Error, !DOMAgent.NodeId=)=} callback |
453 */ | 453 */ |
454 removeNode: function(callback) | 454 removeNode: function(callback) |
455 { | 455 { |
456 this._agent.removeNode(this.id, this._domModel._markRevision(this, callb
ack)); | 456 this._agent.removeNode(this.id, this._domModel._markRevision(this, callb
ack)); |
457 }, | 457 }, |
458 | 458 |
459 copyNode: function() | 459 /** |
| 460 * @param {function(?string)=} callback |
| 461 */ |
| 462 copyNode: function(callback) |
460 { | 463 { |
461 function copy(error, text) | 464 function copy(error, text) |
462 { | 465 { |
463 if (!error) | 466 if (!error) |
464 InspectorFrontendHost.copyText(text); | 467 InspectorFrontendHost.copyText(text); |
| 468 if (callback) |
| 469 callback(error ? null : text); |
465 } | 470 } |
466 this._agent.getOuterHTML(this.id, copy); | 471 this._agent.getOuterHTML(this.id, copy); |
467 }, | 472 }, |
468 | 473 |
469 /** | 474 /** |
470 * @param {string} objectGroupId | 475 * @param {string} objectGroupId |
471 * @param {function(?Array.<!WebInspector.DOMModel.EventListener>)} callback | 476 * @param {function(?Array.<!WebInspector.DOMModel.EventListener>)} callback |
472 */ | 477 */ |
473 eventListeners: function(objectGroupId, callback) | 478 eventListeners: function(objectGroupId, callback) |
474 { | 479 { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 this._attributes.remove(attr); | 707 this._attributes.remove(attr); |
703 delete this._attributesMap[name]; | 708 delete this._attributesMap[name]; |
704 } | 709 } |
705 }, | 710 }, |
706 | 711 |
707 /** | 712 /** |
708 * @param {!WebInspector.DOMNode} targetNode | 713 * @param {!WebInspector.DOMNode} targetNode |
709 * @param {?WebInspector.DOMNode} anchorNode | 714 * @param {?WebInspector.DOMNode} anchorNode |
710 * @param {function(?Protocol.Error, !DOMAgent.NodeId=)=} callback | 715 * @param {function(?Protocol.Error, !DOMAgent.NodeId=)=} callback |
711 */ | 716 */ |
| 717 copyTo: function(targetNode, anchorNode, callback) |
| 718 { |
| 719 this._agent.copyTo(this.id, targetNode.id, anchorNode ? anchorNode.id :
undefined, this._domModel._markRevision(this, callback)); |
| 720 }, |
| 721 |
| 722 /** |
| 723 * @param {!WebInspector.DOMNode} targetNode |
| 724 * @param {?WebInspector.DOMNode} anchorNode |
| 725 * @param {function(?Protocol.Error, !DOMAgent.NodeId=)=} callback |
| 726 */ |
712 moveTo: function(targetNode, anchorNode, callback) | 727 moveTo: function(targetNode, anchorNode, callback) |
713 { | 728 { |
714 this._agent.moveTo(this.id, targetNode.id, anchorNode ? anchorNode.id :
undefined, this._domModel._markRevision(this, callback)); | 729 this._agent.moveTo(this.id, targetNode.id, anchorNode ? anchorNode.id :
undefined, this._domModel._markRevision(this, callback)); |
715 }, | 730 }, |
716 | 731 |
717 /** | 732 /** |
718 * @return {boolean} | 733 * @return {boolean} |
719 */ | 734 */ |
720 isXMLNode: function() | 735 isXMLNode: function() |
721 { | 736 { |
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 * @param {boolean} inspectUAShadowDOM | 1942 * @param {boolean} inspectUAShadowDOM |
1928 * @param {!DOMAgent.HighlightConfig} config | 1943 * @param {!DOMAgent.HighlightConfig} config |
1929 * @param {function(?Protocol.Error)=} callback | 1944 * @param {function(?Protocol.Error)=} callback |
1930 */ | 1945 */ |
1931 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) | 1946 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) |
1932 { | 1947 { |
1933 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); | 1948 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); |
1934 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); | 1949 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); |
1935 } | 1950 } |
1936 } | 1951 } |
OLD | NEW |