@digipair/skill-web 0.64.1 → 0.64.5
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/index.esm.js +4 -2
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -27993,7 +27993,9 @@ const generateElementFromPins = async (pinsSettings, parent, context, document =
|
|
|
27993
27993
|
return;
|
|
27994
27994
|
}
|
|
27995
27995
|
const element = document.createElement(pinsSettings.element);
|
|
27996
|
-
|
|
27996
|
+
// add digipair-vision and aframe compatibility
|
|
27997
|
+
const setAttribute = (attribute, value)=>pinsSettings.element.startsWith('a-') || pinsSettings.element.startsWith('dxr-') ? element.setAttributeNS('', attribute, value) : element.setAttribute(attribute, value);
|
|
27998
|
+
setAttribute('data-digipair-pins', '');
|
|
27997
27999
|
const library = pinsSettings.library;
|
|
27998
28000
|
if (options.import && library !== 'web' && !_config.LIBRARIES[library]) {
|
|
27999
28001
|
const config = context.config || {};
|
|
@@ -28006,7 +28008,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, document =
|
|
|
28006
28008
|
} else if (key === 'innerHTML') {
|
|
28007
28009
|
element.innerHTML = value;
|
|
28008
28010
|
} else if (typeof value === 'string') {
|
|
28009
|
-
|
|
28011
|
+
setAttribute(key, value);
|
|
28010
28012
|
} else {
|
|
28011
28013
|
element[key] = value;
|
|
28012
28014
|
}
|