Allow set title to function return value

Now it is possible to set document.title value to function return value