Skip to content

Commit

Permalink
4.0.0-pre.3 with Issue #15 Add a dummy setter for observeParams property
Browse files Browse the repository at this point in the history
  • Loading branch information
t2ym committed Mar 2, 2019
1 parent cbef17d commit f29349f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions i18n-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ export class I18nFormat extends polyfill(HTMLElement) {
get observeParams() {
return true;
}
set observeParams(value) {
console.warn(`${this.is}: observeParams is deprecated and has a read-only dummy value true.`);
}

connectedCallback() {
this.render();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"homepage": "https://github.com/t2ym/i18n-format#readme",
"name": "i18n-format",
"version": "4.0.0-pre.2",
"version": "4.0.0-pre.3",
"main": "i18n-format.js",
"directories": {
"test": "test"
Expand Down
2 changes: 2 additions & 0 deletions test/basic-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@
test('default observeParams property', function () {
assert.isBoolean(el.observeParams, 'observeParams is a Boolean');
assert.equal(el.observeParams, true, 'default observeParams is true');
el.observeParams = false;
assert.equal(el.observeParams, true, 'observeParams is always true');
});

test('default textContent is empty', function () {
Expand Down

0 comments on commit f29349f

Please sign in to comment.