I am trying to find out the title of the current page with SP.js without having to get it from the DOM.
Is there a way to find what Web Parts are on the current page?
I am trying to find out the title of the current page with SP.js without having to get it from the DOM.
Is there a way to find what Web Parts are on the current page?
You have two ways:
GetLimitedWebPartManager that give to you access on what web part you have on the current page.Do some crawling on your DOM and you will find what do you need.
To get the current page title the only way to do that is reading the DOM. That means:
1) by JQuery: var current_title = $(document).attr('title');
2) standard JS: document.title