You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This JS code will be included inline near the top of <HEAD>. It will enable themes to react to serve JS files accordingly. It will also be used to support CSS in situations where CSS needs to know if JS is enabled or not.
Consider calling this "DCF init" as other tests may be added in the future.
The text was updated successfully, but these errors were encountered:
In discussion with @skoolbus39, we identified an issue that will need resolved in conjunction with this task. Primarily, should the proposed JS code be 1) included inline in a template file or 2) loaded as a separate file, blocking file?
The issue with placing this JS code in a template is that our template file is only a suggestion for themers and application developers to follow and reference. Their CMS or application will have its own template system. As a result, we won't be able to deploy updates to the proposed JS directly. We'll have to document in release notes and rely on themers and application developers to update their template file(s).
Alternatively, we could put the proposed JS in a file (e.g. dcf-init.js), which is called early and blocks other JS. The benefit here is that when we want to change the proposed JS, the updated code is deployed when the themer or application developer updates DCF core in their node.js project. No template changes are required.
We'll want to consider the technical and performance implications of each option.
We want to test two for scenarios:
This JS code will be included inline near the top of
<HEAD>
. It will enable themes to react to serve JS files accordingly. It will also be used to support CSS in situations where CSS needs to know if JS is enabled or not.Consider calling this "DCF init" as other tests may be added in the future.
The text was updated successfully, but these errors were encountered: