0

How do I acess the "this" object in FunScript?

For example:

let this = // ????
Globals.Dollar.Invoke(this).addClass("active")
monoceres
  • 4,722
  • 4
  • 38
  • 63
  • very bad idea to have such var.....! – Jai Mar 01 '16 at 12:30
  • @Jai, Won't this die ? – Rayon Mar 01 '16 at 12:31
  • Why the downvote? I realize that keeping "this" around would be bad, but the "$(this)" pattern is very common when working with jQuery (with event handlers for example), how do I accomplish the same with FunScript? – monoceres Mar 01 '16 at 12:36
  • 1
    Using the tree and forest analogy, instead of asking a question about a tree maybe you should ask a question about the forest. In other words your question in the comment `the "$(this)" pattern is very common when working with jQuery (with event handlers for example), how do I accomplish the same with FunScript?` is higher level. I don't know the answer. Also if you are just learning F# it is not uncommon to paste in code of one language and show what you have tried and failed using and then ask how to do the same in idiomatic F#. We didn't see what you tried. – Guy Coder Mar 01 '16 at 13:18

0 Answers0