Will SPFx Script Editor Web Part continue working after October 1, 2028?

Kavita Pacharane 0 Reputation points
2026-12-03T13:36:33.88+00:00

Subject: Will an SPFx Script Editor Web Part hosting custom HTML, JavaScript and jQuery continue working after October 1, 2028?

Hello Microsoft SharePoint Team,

We are currently migrating an existing Classic SharePoint dashboard to a Modern SharePoint Site Page.

Our current implementation is:

  1. We created a new Modern SharePoint Site Page.

We added an SPFx-based Script Editor Web Part to the page.

Using the Web Part's Edit HTML Code option, we inserted our custom HTML.

Within the HTML, we reference JavaScript, jQuery, Bootstrap, CSS and other JavaScript libraries.

Our JavaScript communicates with SharePoint lists and loads dashboard widgets dynamically.

We are reusing our existing SharePoint configuration lists and dashboard logic.

We also inspected the SPFx package manifest. It contains:

"requiresCustomScript": false

I have read Microsoft's announcement about the retirement of Classic SharePoint Pages and custom scripting, effective October 1, 2028.

I understand that Modern SharePoint Pages and SPFx solutions are not included in the Classic Page Read-only retirement.

However, I would like clarification on the following points:

Will our Modern Site Page remain editable after October 1, 2028?

Will our existing SPFx Script Editor Web Part continue rendering HTML and executing JavaScript and jQuery after this date?

Does the custom scripting restriction (DenyAddAndCustomizePages = true) affect JavaScript dynamically injected through an SPFx Script Editor Web Part?

Is using an SPFx Script Editor Web Part with "requiresCustomScript": false an officially supported approach for hosting custom HTML and JavaScript in Modern SharePoint Pages after October 1, 2028?

Do you recommend migrating the JavaScript functionality into a dedicated SPFx Web Part instead?

We want to ensure that our current Modern SharePoint implementation remains supported and functional after Microsoft's October 2028 changes, without unnecessarily rebuilding the entire dashboard.

Could you please clarify the expected behaviour and recommend the appropriate implementation approach?

Thank you.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments

2 answers

Sort by: Oldest
  1. AI answer

    2026-12-03T13:37:49.0333333+00:00

    A modern page will remain editable after October 1, 2028, but JavaScript pasted into an SPFx Script Editor web part should be migrated into a dedicated SPFx component because SharePoint Online CSP blocks that inline-script pattern independently of the classic-page retirement.

    Expected behavior

    Question Expected behavior
    Will the modern Site Page remain editable? Yes. The October 1, 2028 read-only change applies to classic user-created wiki, Web Part, blog, publishing, and certain custom ASPX pages—not modern Site Pages. ^1^
    Will the Script Editor continue rendering HTML? The documented CSP behavior says HTML added through the community Script Editor web part continues to render.
    Will pasted JavaScript/jQuery continue executing? Do not rely on it. Microsoft explicitly states that the community Script Editor web part and its variations use inline script, and under CSP the added script will not execute even though the HTML remains. CSP enforcement began March 1, 2026, with a one-time option to delay it only until June 1, 2026. ^2^
    Does DenyAddAndCustomizePages = true affect it? That setting blocks classic Script Editor/Content Editor features and removes SPFx web parts whose manifest has "requiresCustomScript": true. Your "requiresCustomScript": false avoids that specific SPFx availability rule, but it does not exempt dynamically inserted or inline JavaScript from CSP. ^3^
    Is the current Script Editor approach officially supported long-term? SPFx itself is Microsoft’s supported extensibility model. A community or third-party Script Editor that accepts arbitrary HTML and script is not thereby converted into a Microsoft-supported script-hosting pattern. Microsoft identifies the community Script Editor specifically as affected by inline-script blocking.
    Should the dashboard become a dedicated SPFx web part? Yes. Move the executable logic into the SPFx bundle while retaining the existing lists and, where practical, the existing business logic.

    A complete dashboard rebuild is not necessarily required:

    1. Keep the modern page and existing SharePoint lists.
    2. Create a dedicated SPFx client-side web part for the dashboard.
    3. Move the pasted JavaScript into TypeScript/JavaScript modules under the SPFx project.
    4. Move HTML generation into the web part’s render/component implementation rather than injecting <script> elements.
    5. Package smaller third-party dependencies with the web part. For example:
    import * as $ from 'jquery';
    
    export function initializeDashboard(container: HTMLElement): void {
      const dashboard = $('<div>')
        .addClass('dashboard-container')
        .text('Loading dashboard…');
    
      $(container).empty().append(dashboard);
    }
    

    SPFx supports packaged external libraries and also supports declaring libraries as external dependencies. ^4^

    1. For externally hosted scripts, configure them through SPFx externals or cdnBasePath. SharePoint can then import those locations into SharePoint admin center → Advanced → Script sources. Scripts loaded by other dynamic mechanisms require an appropriate trusted script source; inline scripts should instead be moved into script files. ^2^
    2. Deploy the .sppkg through the SharePoint App Catalog and test with ordinary users, because an SPFx web part runs in the current user’s context and its list requests remain subject to that user’s permissions.

    SPFx is the supported model for modern-page web parts, but code should remain inside SPFx-supported extension points. Avoid dependencies on SharePoint’s surrounding page DOM or CSS selectors because the page DOM is not an API and can change. ^5^

    Practical conclusion

    The page itself is not threatened by the October 2028 classic-page read-only milestone. The risk is the implementation inside the generic Script Editor: its inline JavaScript is subject to CSP and should not be considered a durable execution mechanism.

    Retain the modern page, lists, and reusable dashboard logic, but package executable code and dependencies in a governed SPFx web part. This also avoids relying on temporarily disabling DenyAddAndCustomizePages, which will be enforced as True and cannot be changed when the October 2028 phase applies to existing tenants. ^1^


    References

    1. Deprecation of Classic SharePoint Pages - SharePoint in Microsoft 365 | Microsoft Learn
    2. Support for Content Security Policy (CSP) in SharePoint Online
    3. Allow or prevent custom script
    4. Add an external library to your SharePoint client-side web part
    5. SharePoint Framework enterprise guidance
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Michelle Nguyen 3,535 Reputation points Independent Advisor
    2026-12-03T14:14:10.29+00:00

    Hi @Kavita Pacharane

    I'm just a fellow community user, not a Microsoft employee, so I can't speak for Microsoft's future plans. Here is what I found in Microsoft's published information.

    1. Modern pages after October 1, 2028 The October 2028 changes target classic pages. In the SharePoint team's announcement, Microsoft states that the setting applies only to classic pages, that modern SharePoint pages are not affected, and that custom solutions built on SPFx will continue to work under your organization's existing governance. Based on that, your modern Site Page should remain editable.
    2. Custom script (DenyAddAndCustomizePages) and your web part From Phase 2, the ability to add or update custom scripts is disabled and DenyAddAndCustomizePages is enforced as True. This setting controls web parts that declare requiresCustomScript: true: those web parts are only available where custom script is allowed. Since your package declares "requiresCustomScript": false, it shouldn't be blocked by that setting, and I would expect it to keep rendering. However, I couldn't find any Microsoft documentation that explicitly covers script editor-style web parts, so I can't confirm this officially.
    3. Is this an officially supported approach? Script editor web parts for modern pages are community samples (for example from the PnP samples gallery), not Microsoft products, so Microsoft doesn't provide support for them. Also note that a web part that lets page editors inject arbitrary HTML and JavaScript without requiring custom script effectively bypasses the purpose of the custom script control, so your SharePoint administrators and security team should be aware of and approve this approach.
    4. Recommendation For a long-term, maintainable solution, I'd recommend moving the dashboard logic into a dedicated SPFx web part: package your JavaScript and libraries in the solution (instead of injecting them at runtime), use SPFx's built-in APIs to read your SharePoint lists, and deploy it through the App Catalog. This keeps the code under source control and normal deployment governance, and doesn't depend on the behavior of a script injection web part. You could do this step by step, widget by widget, rather than rebuilding everything at once.

    References:

    I hope this helps you plan the migration.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.