Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Oakland, CA
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Does Function.caller work in Safari?

    Hey all,

    I'm googled out! This question is a feeler on any information about how Safari implements the Function.caller property. This property works in fox/moz... so why not Safari? Or, if it does, is it done differently?

    Here's my simple test, you can paste it in your browsers adddresbar for a quick fix.

    javascript:function a(){alert('called by:\n'+a.caller)}function b(){a()}b();

    Any help, pointers or tips would be greatly appreciated.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    I have no Mac to verify but according to one of the comments in this blog, Function.caller is not supported in Safari.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    [function Function].caller and [function Function].arguments (and thus also [function Function].arguments.caller) were deprecated in JavaScript 1.3, and were never in ECMAScript. The caller property of the local arguments vector was deprecated in JavaScript 1.3 as well.

    Neither Opera nor Safari support them, and there are no ways of emulating the behavior.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #4
    New Coder
    Join Date
    Aug 2002
    Location
    Oakland, CA
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Cool Thanks for the information

    Glad to hear something about this from others. Thanks for the links and information.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •