Copy

From FirebugWiki

(Difference between revisions)
Jump to: navigation, search
(Added description of syntax, hint for needing help and linked back to Command Line API)
m (Added categories)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
{{needsHelp}}
+
Copies the given object to the clipboard. This can be a return value of a function or a DOM property.
-
 
+
-
Copies the given parameter to the clipboard. This can be a return value of a function or an object.
+
== Syntax ==
== Syntax ==
Line 7: Line 5:
copy(object)
copy(object)
</source>
</source>
 +
 +
== Parameters ==
 +
=== object ===
 +
Object to copy to the clipboard. '''(required)'''
 +
 +
== Examples ==
 +
<source lang="javascript">
 +
copy(obj.name)
 +
</source>
 +
 +
This copies the value of the <code>obj.name</code> property to the clipboard.
 +
 +
<source lang="javascript">
 +
copy($("element").outerHTML)
 +
</source>
 +
 +
This copies the HTML tree of the element with id <code>element</code> including the element tag itself to the clipboard using the [[$|$ command]].
== See also ==
== See also ==
* [[Command Line API]]
* [[Command Line API]]
 +
 +
[[Category:Firebug]]
 +
[[Category:UI]]
 +
[[Category:API]]

Latest revision as of 00:04, 22 November 2013

Copies the given object to the clipboard. This can be a return value of a function or a DOM property.

Contents

[edit] Syntax

copy(object)

[edit] Parameters

[edit] object

Object to copy to the clipboard. (required)

[edit] Examples

copy(obj.name)

This copies the value of the obj.name property to the clipboard.

copy($("element").outerHTML)

This copies the HTML tree of the element with id element including the element tag itself to the clipboard using the $ command.

[edit] See also

Personal tools