PHP's func_get_args() for Javascript


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function func_get_args () {
  2. if (!arguments.callee.caller) {
  3. try {
  4. throw new Error('Either you are using this in a browser which does not support the "caller" property or you are calling this from a global context');
  5. // return false;
  6. } catch (e) {
  7. return false;
  8. }
  9. }
  10.  
  11. return Array.prototype.slice.call(arguments.callee.caller.arguments);
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.