I need to go through all web parts of a page (e.g. default Display page of a list) and set the JSLink property on a particular web part. I can enumerate the web parts on a page and set the property on any of them. However, if there are multiple web parts on the page, I am not able to get the Type for each web part. For e.g. if I put Content Editor web part on Display page in addition to the default view web part, I get two web parts while enumerating but not able to determine which one is content editor and which one is list item display web part.
Reading web part properties using JavaScript Object Model in SharePoint 2013 explains how to get 'Title' property, but this doesn't work for something like TypeName. Is there a standard way to do this in JavaScript and conclusively determine the 'Type' of web part at least for built in web parts? Also, it will be great if it can be done without making multiple load requests to server.
Thanks.