Skip to content
Snippets Groups Projects
Commit d1b70288 authored by Rich Lott / Artful Robot's avatar Rich Lott / Artful Robot
Browse files

1.3.9 remove type=module!!

parent cf8d9333
Branches main
Tags 1.3.9
No related merge requests found
......@@ -28,7 +28,7 @@ class CRM_Inlay_Page_Demo extends CRM_Core_Page {
$editUrl = str_replace('{id}', $inlay->getID(), $inlay->getInstanceEditURLTemplate());
$this->assign('editUrl', CRM_Utils_System::url($editUrl));
$cacheBuster = time();
$this->assign('scriptTag', "<script type=module src=\"{$inlay->getBundleUrl()}?nocache=$cacheBuster\" data-inlay-id=\"{$inlay->getPublicID()}\" ></script>");
$this->assign('scriptTag', "<script defer src=\"{$inlay->getBundleUrl()}?nocache=$cacheBuster\" data-inlay-id=\"{$inlay->getPublicID()}\" ></script>");
parent::run();
}
......
......@@ -177,7 +177,7 @@
}
$scope.getScript = function(i) {
var mainScript = encodeToHTML(`<script type=module src="${i.scriptUrl}" data-inlay-id="${i.public_id}" ></script>`);
var mainScript = encodeToHTML(`<script defer src="${i.scriptUrl}" data-inlay-id="${i.public_id}" ></script>`);
var wpShortcode = encodeToHTML(`[inlay id="${i.public_id}"]`);
console.log({mainScript, wpShortcode});
......
# Change log
## 1.3.9
- remove `type=module`! It requires sites to emit special headers
`Access-Control-Allow-Origin` and breaks on sites without that!
## 1.3.8
- Changes to support better migration and validation of config between versions
of type implementations.
- Suggest `<script>` tags sourcing inlay bundles now specify `type=module`. This
should not hurt existing scripts but might be important to support ESM modules used within scripts.
should not hurt existing scripts but might be important to support ESM modules used within scripts.
⚠️ this turned out to be wrong!
- Inlay tidies up better if you uninstall it. (Warning, if not obvious: it will
now delete all inlay-managed assets, as well as bundle scripts and inlay-specific database tables)
......
......@@ -14,8 +14,8 @@
<url desc="Support">https://lab.civicrm.org/extensions/inlay</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2023-11-24</releaseDate>
<version>1.3.8</version>
<releaseDate>2024-02-19</releaseDate>
<version>1.3.9</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.64</ver>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment