Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1.31
  • master
  • 1.10.0
  • 1.30.1
  • 1.31.0
  • 1.8.0
  • 1.9.0
  • 3.100.0
  • 3.100.1
  • 3.100.10
  • 3.100.11
  • 3.100.12
  • 3.100.13
  • 3.100.14
  • 3.100.15
  • 3.100.16
  • 3.100.17
  • 3.100.18
  • 3.100.19
  • 3.100.2
  • 3.100.20
  • 3.100.3
  • 3.100.4
  • 3.100.5
  • 3.100.6
  • 3.100.7
  • 3.100.8
  • 3.100.9
  • 3.101.0
  • 3.101.1
  • 3.101.2
  • 3.101.3
  • 3.102.0
  • 3.102.1
  • 3.102.2
  • 3.102.3
  • 3.102.4
  • 3.102.5
  • 3.102.6
  • 3.103.0
  • 3.103.1
  • 3.104.0
  • 3.104.1
  • 3.105.0
  • 3.105.1
  • 3.105.2
  • 3.106.0
  • 3.106.1
  • 3.107.0
  • 3.108.0
  • 3.108.1
  • 3.108.2
  • 3.108.3
  • 3.108.4
  • 3.108.5
  • 3.109.0
  • 3.110.0
  • 3.110.1
  • 3.110.2
  • 3.110.3
  • 3.110.4
  • 3.111.0
  • 3.112.0
  • 3.112.1
  • 3.112.2
  • 3.112.3
  • 3.112.4
  • 3.113.0
  • 3.114.0
  • 3.114.1
  • 3.114.2
  • 3.114.3
  • 3.114.4
  • 3.114.5
  • 3.114.6
  • 3.114.7
  • 3.115.0
  • 3.115.1
  • 3.115.2
  • 3.115.3
  • 3.115.4
  • 3.116.0
  • 3.116.1
  • 3.117.0
  • 3.117.1
  • 3.117.2
  • 3.117.3
  • 3.118.0
  • 3.118.1
  • 3.119.0
  • 3.120.0
  • 3.121.0
  • 3.51.5
  • 3.52.0
  • 3.52.1
  • 3.53.0
  • 3.54.0
  • 3.55.0
  • 3.55.1
  • 3.55.2
  • 3.55.3
  • 3.55.4
102 results

Target

Select target project
  • oss/libraries/javascript/monster
1 result
Select Git revision
  • 1.31
  • master
  • 1.10.0
  • 1.30.1
  • 1.31.0
  • 1.8.0
  • 1.9.0
  • 3.100.0
  • 3.100.1
  • 3.100.10
  • 3.100.11
  • 3.100.12
  • 3.100.13
  • 3.100.14
  • 3.100.15
  • 3.100.16
  • 3.100.17
  • 3.100.18
  • 3.100.19
  • 3.100.2
  • 3.100.20
  • 3.100.3
  • 3.100.4
  • 3.100.5
  • 3.100.6
  • 3.100.7
  • 3.100.8
  • 3.100.9
  • 3.101.0
  • 3.101.1
  • 3.101.2
  • 3.101.3
  • 3.102.0
  • 3.102.1
  • 3.102.2
  • 3.102.3
  • 3.102.4
  • 3.102.5
  • 3.102.6
  • 3.103.0
  • 3.103.1
  • 3.104.0
  • 3.104.1
  • 3.105.0
  • 3.105.1
  • 3.105.2
  • 3.106.0
  • 3.106.1
  • 3.107.0
  • 3.108.0
  • 3.108.1
  • 3.108.2
  • 3.108.3
  • 3.108.4
  • 3.108.5
  • 3.109.0
  • 3.110.0
  • 3.110.1
  • 3.110.2
  • 3.110.3
  • 3.110.4
  • 3.111.0
  • 3.112.0
  • 3.112.1
  • 3.112.2
  • 3.112.3
  • 3.112.4
  • 3.113.0
  • 3.114.0
  • 3.114.1
  • 3.114.2
  • 3.114.3
  • 3.114.4
  • 3.114.5
  • 3.114.6
  • 3.114.7
  • 3.115.0
  • 3.115.1
  • 3.115.2
  • 3.115.3
  • 3.115.4
  • 3.116.0
  • 3.116.1
  • 3.117.0
  • 3.117.1
  • 3.117.2
  • 3.117.3
  • 3.118.0
  • 3.118.1
  • 3.119.0
  • 3.120.0
  • 3.121.0
  • 3.51.5
  • 3.52.0
  • 3.52.1
  • 3.53.0
  • 3.54.0
  • 3.55.0
  • 3.55.1
  • 3.55.2
  • 3.55.3
  • 3.55.4
102 results
Show changes

Commits on Source 4

<a name="v3.44.1"></a>
## [v3.44.1] - 2023-05-01
### Bug Fixes
- Fixed mutation observer for custom controls.
<a name="v3.44.0"></a>
## [v3.44.0] - 2023-05-01
### Changes
......@@ -596,6 +602,7 @@
<a name="1.8.0"></a>
## 1.8.0 - 2021-08-15
[v3.44.1]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.44.0...v3.44.1
[v3.44.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.43.0...v3.44.0
[v3.43.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.42.1...v3.43.0
[v3.42.1]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.42.0...v3.42.1
......
{
"name": "@schukai/monster",
"version": "3.43.0",
"version": "3.44.0",
"description": "Monster is a simple library for creating fast, robust and lightweight websites.",
"keywords": [
"framework",
......
......@@ -60,6 +60,12 @@ const assembleMethodSymbol = Symbol.for("@schukai/monster/dom/@@assembleMethodSy
*/
const attributeObserverSymbol = Symbol.for("@schukai/monster/dom/@@attributeObserver");
/**
* @private
* @type {symbol}
*/
const attributeMutationObserverSymbol = Symbol("@schukai/monster/dom/@@mutationObserver");
/**
* HTMLElement
* @external HTMLElement
......@@ -205,7 +211,7 @@ class CustomElement extends HTMLElement {
});
this[initMethodSymbol]();
initOptionObserver.call(this);
initAttributeChangeMutationObserver.call(this);
}
/**
......@@ -546,6 +552,9 @@ class CustomElement extends HTMLElement {
customElementUpdaterLinkSymbol,
clone(self[internalSymbol].getRealSubject()["options"]),
);
attachAttributeChangeMutationObserver.call(this);
return self;
}
......@@ -561,6 +570,7 @@ class CustomElement extends HTMLElement {
if (!hasObjectLink(self, customElementUpdaterLinkSymbol)) {
self[assembleMethodSymbol]();
}
}
/**
......@@ -598,7 +608,12 @@ class CustomElement extends HTMLElement {
const callback = self[attributeObserverSymbol]?.[attrName];
if (isFunction(callback)) {
try {
callback.call(self, newVal, oldVal);
} catch (e) {
addAttributeToken(self, ATTRIBUTE_ERRORMESSAGE, e.toString());
}
}
}
......@@ -630,19 +645,30 @@ class CustomElement extends HTMLElement {
* @private
* @this CustomElement
*/
function initAttributeChangeMutationObserver() {
function attachAttributeChangeMutationObserver() {
const self = this;
new MutationObserver(function (mutations) {
if (typeof self[attributeMutationObserverSymbol] !== "undefined") {
return;
}
self[attributeMutationObserverSymbol] = new MutationObserver(function (mutations, observer) {
for (const mutation of mutations) {
if (mutation.type === "attributes") {
self.attributeChangedCallback(mutation.attributeName, mutation.oldValue, mutation.target.getAttribute(mutation.attributeName));
}
}
}).observe(self, {
});
try {
self[attributeMutationObserverSymbol].observe(self, {
attributes: true,
attributeOldValue: true,
});
} catch (e) {
addAttributeToken(self, ATTRIBUTE_ERRORMESSAGE, e.toString());
}
}
/**
......
......@@ -142,7 +142,7 @@ function getMonsterVersion() {
}
/** don't touch, replaced by make with package.json version */
monsterVersion = new Version("3.43.0");
monsterVersion = new Version("3.44.0");
return monsterVersion;
}
{
"name": "monster",
"version": "3.43.0",
"version": "3.44.0",
"description": "monster",
"repository": {
"type": "git",
......@@ -31,20 +31,20 @@
"clean-jsdoc-theme": "^4.2.7",
"create-polyfill-service-url": "^2.2.6",
"crypt": "^0.0.2",
"cssnano": "^6.0.0",
"esbuild": "^0.17.15",
"flow-bin": "^0.203.1",
"cssnano": "^6.0.1",
"esbuild": "^0.17.18",
"flow-bin": "^0.205.0",
"fs": "0.0.1-security",
"glob": "^9.3.4",
"glob": "^10.2.2",
"graphviz": "^0.0.9",
"jsdoc": "^4.0.2",
"jsdoc-external-example": "github:volker-schukai/jsdoc-external-example",
"jsdoc-plantuml": "^1.0.2",
"jsdom": "^21.1.1",
"jsdoc-plantuml": "^1.0.3",
"jsdom": "^21.1.2",
"jsdom-global": "^3.0.2",
"mocha": "^10.2.0",
"node-plantuml": "^0.9.0",
"postcss": "^8.4.21",
"postcss": "^8.4.23",
"postcss-fluid": "^1.4.2",
"postcss-for": "^2.1.1",
"postcss-import": "^15.1.0",
......@@ -54,18 +54,18 @@
"postcss-nesting": "^11.2.2",
"postcss-normalize": "^10.0.1",
"postcss-responsive-type": "^1.0.0",
"postcss-rtlcss": "^4.0.3",
"postcss-rtlcss": "^4.0.5",
"postcss-strip-units": "^2.0.1",
"rome": "^12.0.0",
"sinon": "^15.0.3",
"sinon": "^15.0.4",
"url": "^0.11.0",
"url-exist": "3.0.1",
"util": "^0.12.5",
"vite": "^4.2.1",
"vite": "^4.3.3",
"vite-plugin-banner": "^0.7.0",
"vite-plugin-list-directory-contents": "^1.4.5",
"vite-plugin-minify": "^1.5.2",
"vite-plugin-mkcert": "^1.14.0",
"vite-plugin-mkcert": "^1.14.1",
"ws": "^8.13.0"
}
}
import {Fetch} from '../../../application/source/i18n/providers/fetch.mjs';
import {Updater} from '../../../application/source/dom/updater.mjs';
// import {Fetch} from '../../../application/source/i18n/providers/fetch.mjs';
// import {Updater} from '../../../application/source/dom/updater.mjs';
import {
attributeObserverSymbol,
CustomElement,
registerCustomElement
} from '../../../application/source/dom/customelement.mjs';
} from '../../../application/source/monster.mjs';
import {domReady} from '../../../application/source/dom/ready.mjs';
import {Embed} from '../../../application/source/i18n/providers/embed.mjs';
import {ATTRIBUTE_OPTIONS_SELECTOR} from "../../../application/source/monster.mjs";
// import {Embed} from '../../../application/source/i18n/providers/embed.mjs';
// import {ATTRIBUTE_OPTIONS_SELECTOR} from "../../../application/source/monster.mjs";
const initMethodSymbol = Symbol.for("@schukai/monster/dom/@@initMethodSymbol");
......@@ -56,10 +56,10 @@ class Monster1 extends CustomElement {
domReady.then(() => {
const m1 = document.querySelector("monster-1");
console.log(m1);
window.m1 = m1;
//console.log(m1);
window.m1 = document.querySelector("monster-1");;
// read from scritp tag with id i18n
......
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Popper Button</title>
<script src="main.mjs" type="module"></script>
<script src="updater.js" type="module"></script>
</head>
<body>
<a href="../">Back</a>
......
This diff is collapsed.
......@@ -7,7 +7,7 @@ describe('Monster', function () {
let monsterVersion
/** don´t touch, replaced by make with package.json version */
monsterVersion = new Version("3.43.0")
monsterVersion = new Version("3.44.0")
let m = getMonsterVersion();
......
{"version":"3.44.0"}
{"version":"3.44.1"}