Caller
function Fun Caller returns the function object that calls fun, which is the execution environment for fun, and returns null if the execution environment for fun is window
function Fun () {
console.log (Fun.caller)//must be written in fun, because caller is only valid during function execution
}
fun ();
The result is: null
One layer below.
function
(Arguments.selfvalue);
}
Run code you will find that the first alert shows 1, which means that the array object has the Selfvalue property, the value is 1, and when you call the function testaguments, you will notice that "undefined" is displayed, stating that the attribute is not arguments. That is, arguments is not an array object.
Second, caller
Returns a reference to a function that calls the current function.
Functionname.caller
The FunctionNam
This article is an example of how Android monitors phone status and sends email notification calls. Share to everyone for your reference, specific as follows:
You can use Phonestatelistener to listen to mobile phone status (e.g. standby, call, Bell, etc.) on Android. This example is through it to monitor mobile phone status, when the phone calls, through the mail will send the caller number to the user's mailbox example. The specific procedures are a
array object.
CallerReturns a reference to a function that calls the current function.Functionname.callerThe FunctionName object is the name of the function being executed.DescriptionFor functions, the caller property is only defined when the function executes. If the function is called by the top level, then caller contains null. If you use the Caller property
1. PrefaceArguments, caller, what is callee?What is the role in JavaScript? This article will do some basic introduction.This article was reproduced from: http://blog.csdn.net/oscar999/article/details/85113352. ArgumentsArguments: When a function is called, a hidden object named arguments is automatically generated inside the function. The object is similar to an array, but not an array. You can use the [] operator to get the arguments that are passed
1. Who's the class of self instance?Class AA (Object): def A (self): if self.__class__.__name__ = = ' AA ': print "AA, a Func ()" elif self.__ class__.__name__ = = "BB": print "BB, a Func ()" Class BB (aa): def b (self): print "AA, b func ()" AA (). A () BB (). A ( )---------------------------------------------------------------------result:AA, a func () BB, a func ()2.Who is the caller of functionImpor
First, caller
Returns a reference to a function that calls the current function.
Functionname.caller
The FunctionName object is the name of the function being executed.
Description
For functions, the caller property is only defined when the function executes. If a function is called by the top level of a Javascript program, then caller contains null.
The fo
:
var func=new function () {this.a= "func"}
var myfunc=function (x,y) {
var a= "MyFunc";
alert (THIS.A);
Alert (x + y);
}
Myfunc.call (func, "var", "fun");/"Func" "var fun"
Myfunc.apply (func,["var", "Fun"]);/"Func" "var fun"
third, caller propertiesReturns a reference to a function that invokes the function body of the current function.
The FunctionName.caller:functionName object is the name of the function being execu
Keywords: arguments,callee,callerArguments: An argument that represents an incoming functionCallee: Statements representing functions and body of functionsCaller: Represents a function that calls the functionArguments
The object represents the function being executed and the arguments of the function that called it.
Caller
Returns a reference to a function that calls the current function.Functionname.callerThe FunctionName object is the name of the
Yesterday realized 360 mobile phone Guardian's caller ID to display the function, the specific function is when the caller, display the current number of the place, after learning to find the operation
Very simple, the specific implementation of the code is as follows:
Addressservice.java
Package com.qingguow.mobilesafe.service;
Import Com.qingguow.mobilesafe.utils.NumberQueryAddressUtil;
Import An
object is the name of the function being executed.DescriptionFor a function, the caller property is defined only when the function executes. If the function is called by the top level, then caller contains null.Callee:Returns the function object being executed, which is the body of the specified function object.[function.] Arguments.calleeThe optional function parameter is the name of the function object t
When a log component is made, the caller information is often logged, usually through reflection to obtain the appropriate information. However,. Net 4.5 introduces three new features, Callerfilepathattribute,callerlinenumberattribute and Callermembernameattribute. These three attributes can only be applied to parameters and are only useful when applied with optional parameters. The idea is simple: if the calling point does not provide an argument, th
These two interpretations are widely used on the Internet, but some typographical expressions on the Internet are really uncomfortable. So here we will talk about them with simple and plain sentences.
Arguments. callee is the current function.
Function. caller is the function that calls the current function.
ExampleFunction F1 ()
{
Alert (arguments. callee); // The result is the same as that in the following sentence.
Alert (F1); // display the co
When writing some underlying modules, especially the Log Module and underlying services, You need to record Caller information, such as module name, file name, function name, line number, etc, instead of recording the information of the underlying modules we have written. At this time, you need to use the python inspect module to complete the corresponding functions.BelowCodeFor example only:
# -*-Coding: UTF-8 -*- ''' @ Summary: get caller's mod
Caller of the get Method
If you write a super complex, super large project, and suddenly want to know which classes have called the important method in importantclass during later project debugging and modification, what would you do?
First, you may say: I cannot use it! In this case, you can return.Method 1: The most common and effective method is to use the full-text search method name of IDE. Of course, this is the most effective and fast. Howev
Arguments. callee points to the function itself within the function.
1. function call
Function sum (Num ){If (Num Return 1;} Else {Return num * (arguments. callee (Num-1 ))}}
2. differentiate form parameters
Function A (num1, num2, num3 ){Console. Log (arguments. Length); // The real parameter length is 1Console. Log (arguments. callee. Length); // The length of the row parameter is 3.}A (0 );
Call returns the execution environment of the called function.
Function A () {fun (); function
argument list)
And the first one is a property that needs to be learned today. Let's look at an example:function Add (A, b) {console.log (Arguments.callee); return a+b;} Add (3,4);Results: As you can see from the results, callee is a pointer to the function that owns the arguments object. So what can you do with this property? Let's look at an example:The factorial of function FAC (num) {if (num Results:The result is not what we want, and the reason for this result is that FAC,FAC (
Inside the function, Arguments.callee the property is a pointer to the function that owns the arguments object;And another property of the function object: caller, which holds a reference to the function that called the current function, and if the current function is called in the global scope, its value is null.1The usage and difference of JS Arguments.callee Caller
Scenario RequirementsWhen the phone calls, sometimes not easy to answer the phone, hoping to touch the screen to achieve the effect of silence, and then answer the phone.Development ideasFirst you have to get a phone call event, and then listen to the screen click events, so that the phone ringtone muteDifficult pointMobile phone Call event, is the highest priority in the system, third-party applications can not change the system comes with the call function.SolutionsLooking at some of the commo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.