In Classic SharePoint days I would break out the CEWP (or do it straight from a UCA-ScriptLink) and add content to the DOM or even replace the whole s4-workspace

  • Do I (each CSWP) now have to stay within CanvasZone boundaries?
  • Will I break anything if I replace id='pageContent' ?

2 Answers 2


It's a bad idea to break outside of this.DomElement. There is really no guarantee that the markup on the page will a) remain consistent over time or b) remain consistent across page types.

We're working on the extensibility model for full page apps, page layouts and non-webpart controls, but client side webparts is not the answer.

  • This has been MSFT stride since 2013 was released. Great to be consistent over time.
    – Benny Skogberg
    Commented Aug 21, 2016 at 8:14

Your script is running in the page so you should be able to get at any DOM element. Yes you could use that to break stuff. Bear in mind that workbench.aspx is just a representation of the page for development purposes.

If you start changing IDs on tags with names like "pageContent" then, yes, you will probably break something - maybe not today, but...

  • 2
    Yes. This will break stuff. While things are client-side and you have access to DOM we want to ensure we provide you with the right APIs to enable different scenarios. Can you tell us what is the scenario you are trying to accomplish? Commented Aug 19, 2016 at 15:53
  • 1
    I wanted to use the SPA (Dashboards on REST endpoints) we created for "Classic", but so far I don't see the benefits of SPfx. It does not give me anything more than I already had. Commented Aug 19, 2016 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.