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 8086121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:21:15+00:00 2026-06-05T18:21:15+00:00

I am rewriting one of javascript’s core methods: Element.prototype._removeChild = Element.prototype.removeChild; Element.prototype.removeChild = function(){

  • 0

I am rewriting one of javascript’s core methods:

Element.prototype._removeChild = Element.prototype.removeChild;
Element.prototype.removeChild = function(){
    callback();
    this._removeChild.apply(this,arguments);
}

I want to dynamically get the name of the method (in this case “removeChild”) from inside of the function being dynamically rewritten. I use arguments.callee.name but it seems to return nothing, thinking that it is just an anonymous function. How do I get the name of the function that the anonymous function is being assigned to?

  • 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-06-05T18:21:16+00:00Added an answer on June 5, 2026 at 6:21 pm

    It is an anonymous function. You are just assigning this anonymous function to the Element.prototype.removeChild property, but that does not make that property a name for the function. You can assign the same function to many variables and properties, and there is no way to know the name by which it has been called.

    You can however give the function a proper name which you can access as arguments.callee.name:

    Element.prototype.removeChild = function removeChild() {
        ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently rewriting one of my programs. It has a heavily recursive function
I'm rewriting one of our forms so that it can handle international domains, but
I use url rewriting and one of my urls is /blah/file ILLEGAL CHARS.jpg ILLEGAL
I'm rewriting a data-driven legacy application in Python. One of the primary tables is
Edit: I'm rewriting this question because I apparently wasn't clear. Sometimes the GPS service
I have this error on one of my sites. Searched thought all project found
I've just had my first experience with rewriting the history of one of my
I'm rewriting the goBack function with my own because I need to be able
Is it possible to have one CSS class reference another? Instead of rewriting all
This rewriting rule is not working (the id is empty after redirecting): RewriteRule ^album/([0-9]+)$

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.