Skip to content

Commit

Permalink
fix: [#1487] Changes wrong property name inputmode to inputMode in HT…
Browse files Browse the repository at this point in the history
…MLInputElement and HTMLTextAreaElement (#1519)

* fix: [#1487] Changes wrong property name inputmode to inputMode in HTMLInputElement and HTMLTextAreaElement

* chore: [#1487] Attempt to fix unit tests
  • Loading branch information
capricorn86 committed Aug 29, 2024
1 parent 48dc929 commit 2b20cc3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ export default class HTMLInputElement extends HTMLElement {
*
* @returns Inputmode.
*/
public get inputmode(): string {
public get inputMode(): string {
return this.getAttribute('inputmode') || '';
}

Expand All @@ -496,7 +496,7 @@ export default class HTMLInputElement extends HTMLElement {
*
* @param inputmode Inputmode.
*/
public set inputmode(inputmode: string) {
public set inputMode(inputmode: string) {
this.setAttribute('inputmode', inputmode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class HTMLTextAreaElement extends HTMLElement {
*
* @returns Inputmode.
*/
public get inputmode(): string {
public get inputMode(): string {
return this.getAttribute('inputmode') || '';
}

Expand All @@ -167,7 +167,7 @@ export default class HTMLTextAreaElement extends HTMLElement {
*
* @param inputmode Inputmode.
*/
public set inputmode(inputmode: string) {
public set inputMode(inputmode: string) {
this.setAttribute('inputmode', inputmode);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/happy-dom/test/browser/BrowserFrame.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ describe('BrowserFrame', () => {
? '<a href="http://localhost:3000/navigated/">'
: '<b>Navigated</b>'
),
1
10
)
)
});
Expand Down Expand Up @@ -816,7 +816,7 @@ describe('BrowserFrame', () => {
? '<a href="http://localhost:3000/navigated/">'
: '<b>Navigated</b>'
),
1
10
)
)
});
Expand Down Expand Up @@ -871,7 +871,7 @@ describe('BrowserFrame', () => {
? '<a href="http://localhost:3000/navigated/">'
: '<b>Navigated</b>'
),
1
10
)
)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ describe('HTMLInputElement', () => {
'pattern',
'placeholder',
'step',
'inputmode'
'inputMode'
]) {
describe(`get ${property}()`, () => {
it('Returns attribute value.', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('HTMLTextAreaElement', () => {
});
}

for (const property of ['name', 'autocomplete', 'cols', 'rows', 'placeholder']) {
for (const property of ['name', 'autocomplete', 'cols', 'rows', 'placeholder', 'inputMode']) {
describe(`get ${property}()`, () => {
it('Returns attribute value.', () => {
expect(element[property]).toBe('');
Expand Down

0 comments on commit 2b20cc3

Please sign in to comment.