Dec 05 2017 02:59 AM
Hi
I've created a SharePoint Framework Extension that does the following:
Both the above are dependent on CSS classes within the rendered page:
Hidden when printed:
root_db29caec, nav_995e56d3, #SuiteNavPlaceHolder, commentsWrapper_3f0ee14c, banner_995e56d3, feedback_674c19bf
Footer appended to:
CanvasZone--read
Should I be concerned about these class names changing? If yes, what are the alternatives?
Thanks.
Dec 05 2017 03:28 AM
I would be very concerned personally as the code can break at any time
I would follow the application customizer approach as that is the only one that guaranties that your code will always have the required dependencies on the page.
Dec 05 2017 03:36 AM
I'm familiar with the example, in fact, that's the starting point for my extension. I've modelled the footer in both the application customizer (placeholder) way and the JavaScript injection way. I'm hoping my company will accept the application customizer way.
That still leaves me with the print stylesheet task. As there is no inbuilt way to achieve this, the only solution I can currently think of is to reference the CSS classes. I don't like this solution as it is brittle.