Possible Duplicate:
Why is JSHINT complaining that this is a strict violation?
In the abbreviated code below I use this function for determining if a function argument is an element id or an object. This way I always have the element to work with.
function domPageFlip( some_var )
{
var select_element;
if( typeof ( some_var ) === 'string' ) // internally called
{
select_element = document.getElementById( some_var );
}
else // called by user event ( via event listener )
{
select_element = this;
}
jshint gives a possible strict violation. How do I write the code so I do not get this violation?