Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613192
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:05:35+00:00 2026-05-18T22:05:35+00:00

Update Looks like browsers are starting to support copy natively in JS In the

  • 0

Update

Looks like browsers are starting to support copy natively in JS


In the console windows of both Chrome and Firefox on Mac I can execute

copy("party in your clipboard!");

and the text gets copied to my clipboard. I have searched SO and Google and can’t seem to find anything on this.

  • Are these specific to each browser?
  • Where can I find more information on
    these JavaScript functions?

Browser versions:

alt text
alt text

JavaScript returned from Chrome console when executing ‘copy’

function (object)
    {
        if (injectedScript._type(object) === "node") {
            var nodeId = InjectedScriptHost.pushNodePathToFrontend(object, false, false);
            InjectedScriptHost.copyNode(nodeId);
        } else
            InjectedScriptHost.copyText(object);
    }
  • What does this code mean?

Here are 2 screenshots of executing copy function in Chrome console with all chrome extensions disabled

alt text

alt text

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:05:35+00:00Added an answer on May 18, 2026 at 10:05 pm

    I believe these are predefined Firebug console functions – at least that seems to be the case for Firebug. If you try calling window.copy for instance, you’ll get a warning about function not defined, so it’s definitely not a browser function, and cannot be used in normal JavaScript files. The following functions also seems to work in the JavaScript console, after playing around with it a bit:

    • clear()
    • profile()

    Running these in the Chrome console reveals the source behind these functions in the Webkit console:

    > profile
    function ()
    {
    return console.profile.apply(console, arguments)
    }
    
    > clear
    function ()
    {
    InjectedScriptHost.clearConsoleMessages();
    }
    
    > copy
    function (object)
    {
    if (injectedScript._type(object) === "node")
    object = object.outerHTML;
    InjectedScriptHost.copyText(object);
    }
    

    While the Firebug source also defines a list of functions:

    this.clear = function()  // no web page interaction
    {
        Firebug.Console.clear(context);
    };
    
    this.inspect = function(obj, panelName)  // no web page interaction
    {
        Firebug.chrome.select(obj, panelName);
    };
    
    this.keys = function(o)
    {
        return FBL.keys(o);  // the object is from the page, unwrapped
    };
    
    this.values = function(o)
    {
        return FBL.values(o); // the object is from the page, unwrapped
    };
    
    // etc...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE It looks like this problem has been quietly fixed in iOS 4.3. Up
It looks like Django does not update last_login field in auth_user model when a
UPDATE: OK I figured it out, looks like fread has a filesize limitation, changed
Update As suggested by many people, it looks like this was because of the
I have some code to update a database table that looks like try {
Can I run Java applications (Java Web Start) on iPad? Looks like this is
Update : Looks like I got caught up in a correlation that was not
This is what it looks like: artifact org.springframework:spring-core: checking for updates from glassfish-repository WARNING]
I have an if statement that needs to look like this: UPDATE $(input#textbox).keypress(function(e){ key==e.which;
I'm trying to format a box to look like a status update like feature.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.