Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
- browser Microsft Edge 90.0.818.42
- SPFx version 1.11.0
- Node.js version v10.24.0
Describe the bug / error
Page is not fully loaded which causes that elements like following button is not loaded in the DOM Content.
Following button is not loaded when trying to extend it's functionality by adding event handler to it.
Steps to reproduce
- create a simple Application Customizer
- In the public onInit(): Promise {}
- add a some code to add event hander to following button in a SharePoint Site home page
- Sample snippet to add click event handler
private registerFollowingButtonClickHandlers() {
// Registering the handlers
let followingButton = document.querySelector(
".ms-Button.ms-Button--action.ms-Button--command.ms-CompositeHeader-collapsible"
);
debugger;
followingButton.addEventListener("click", (e) => {
console.log("Following Button Clicked");
});
}
Expected behavior
Excepted behavior is to be able to extend the functionality of the following/Not following button in the SharePoint site home page.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
Page is not fully loaded which causes that elements like following button is not loaded in the DOM Content.
Following button is not loaded when trying to extend it's functionality by adding event handler to it.
Steps to reproduce
private registerFollowingButtonClickHandlers() {
// Registering the handlers
let followingButton = document.querySelector(
".ms-Button.ms-Button--action.ms-Button--command.ms-CompositeHeader-collapsible"
);
debugger;
followingButton.addEventListener("click", (e) => {
console.log("Following Button Clicked");
});
}
Expected behavior
Excepted behavior is to be able to extend the functionality of the following/Not following button in the SharePoint site home page.