{"id":7065,"date":"2014-05-19T04:11:29","date_gmt":"2014-05-19T04:11:29","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/how-to-check-if-an-object-has-a-function-dojo-collection-of-common-programming-errors\/"},"modified":"2014-05-19T04:11:29","modified_gmt":"2014-05-19T04:11:29","slug":"how-to-check-if-an-object-has-a-function-dojo-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/how-to-check-if-an-object-has-a-function-dojo-collection-of-common-programming-errors\/","title":{"rendered":"How to check if an object has a function? (DoJo)-Collection of common programming errors"},"content":{"rendered":"<pre><code>var testObj = this.getView();\n<\/code><\/pre>\n<p>How can I check with DoJo (or just native JS) if testObj has <code>callableFunction<\/code> before I actually try to call <code>callableFunction()<\/code> and fail if it isn&#8217;t there? I would prefer a native-DoJo solution as I need this to work on all browsers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>var testObj = this.getView(); How can I check with DoJo (or just native JS) if testObj has callableFunction before I actually try to call callableFunction() and fail if it isn&#8217;t there? I would prefer a native-DoJo solution as I need this to work on all browsers.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7065","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7065"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7065\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}