diff --git a/i18n-format.js b/i18n-format.js index 7be8609..7090e83 100644 --- a/i18n-format.js +++ b/i18n-format.js @@ -269,7 +269,10 @@ export class I18nFormat extends polyfill(HTMLElement) { return true; } set observeParams(value) { - console.warn(`${this.is}: observeParams is deprecated and has a read-only dummy value true.`); + if (!this.constructor._observeParamsWarned) { + console.warn(`${this.is}: observeParams is deprecated and has a read-only dummy value true.`); + this.constructor._observeParamsWarned = true; + } } connectedCallback() { diff --git a/package.json b/package.json index eaf1140..852400d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/t2ym/i18n-format#readme", "name": "i18n-format", - "version": "4.0.0-pre.3", + "version": "4.0.0-pre.4", "main": "i18n-format.js", "directories": { "test": "test" diff --git a/test/basic-test.html b/test/basic-test.html index cffaeb2..b866c1f 100755 --- a/test/basic-test.html +++ b/test/basic-test.html @@ -366,6 +366,8 @@ assert.equal(el.observeParams, true, 'default observeParams is true'); el.observeParams = false; assert.equal(el.observeParams, true, 'observeParams is always true'); + el.observeParams = false; + assert.equal(el.observeParams, true, 'observeParams is always true'); }); test('default textContent is empty', function () {