@cocreate/elements 1.7.0 → 1.7.1
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/setValue.js +1 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.7.1](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.7.0...v1.7.1) (2022-05-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* if srcdoc is removed iframe is refreshed losing its content. removed code that removed srcdoc. ([6fdd25b](https://github.com/CoCreate-app/CoCreate-elements/commit/6fdd25b07d378b5dec971e9f07d42062365e29f7))
|
|
7
|
+
|
|
1
8
|
# [1.7.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.6.17...v1.7.0) (2022-05-14)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/elements",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"elements",
|
package/src/setValue.js
CHANGED
|
@@ -107,17 +107,8 @@ var setValue = (el, value) => {
|
|
|
107
107
|
else if (el.tagName === 'IMG' || el.tagName === 'SOURCE')
|
|
108
108
|
el.src = value;
|
|
109
109
|
|
|
110
|
-
else if (el.tagName === 'IFRAME')
|
|
110
|
+
else if (el.tagName === 'IFRAME')
|
|
111
111
|
el.srcdoc = value;
|
|
112
|
-
// el.contentDocument.documentElement.innerHTML = value;
|
|
113
|
-
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){
|
|
114
|
-
// Do Firefox-related activities
|
|
115
|
-
}
|
|
116
|
-
else
|
|
117
|
-
el.onload = function(e) {
|
|
118
|
-
el.removeAttribute('srcdoc');
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
112
|
|
|
122
113
|
else if (el.tagName === 'DIV') {
|
|
123
114
|
if (el.hasAttribute("value")) {
|