adding a method to obtain the JSElement and avoid passing invalid variab...

adding a method to obtain the JSElement and avoid passing invalid variables to JS methods
Could you add a description for the param:

```* @param Type $name A description of the variable and it's usage.```

And also a line of space after the description for the method?