nbhi 0.6.9 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/javascript/attributes.js +1 -1
- package/javascript/index.js +1 -4
- package/package.json +1 -1
package/javascript/attributes.js
CHANGED
|
@@ -124,7 +124,7 @@ function updateAttributes({ name, value, attributeMapping, root }) {
|
|
|
124
124
|
} else {
|
|
125
125
|
element.setAttribute(name, value);
|
|
126
126
|
// Triggers <select> to update the selected <option>
|
|
127
|
-
if (name === 'value') {
|
|
127
|
+
if (name === 'value' && element.localName === 'select') {
|
|
128
128
|
element.value = value;
|
|
129
129
|
}
|
|
130
130
|
}
|
package/javascript/index.js
CHANGED
|
@@ -115,10 +115,7 @@ async function initialize({ prefix = 'db', source = '/components' } = {}) {
|
|
|
115
115
|
|
|
116
116
|
connectedCallback() {
|
|
117
117
|
if (typeof script === 'function') {
|
|
118
|
-
script(this, path => {
|
|
119
|
-
const baseUrl = new URL('./', import.meta.url).origin;
|
|
120
|
-
return import(`${ baseUrl }${ path }`);
|
|
121
|
-
});
|
|
118
|
+
script(this, path => import(`${ window.location.origin }${ path }`));
|
|
122
119
|
}
|
|
123
120
|
}
|
|
124
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nbhi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"description": "No-Build HTML Includes (NBHI) is a simple library that allows you to include html files into other html files and turns them into [web components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components). Lazy initialization of content (when entering the viewport) and a one line call to update/hydrate content in your html pages. No build tools required, no `package.json` needed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|