You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('get dataset()',()=>{it('Returns attributes prefixed with "data-" as an object.',()=>{element.setAttribute('test1','value1');element.setAttribute('data-test2','value2');element.setAttribute('test3','value3');element.setAttribute('data-test4','value4');element.dataset.test5='value5';// Add this lineexpect(element.dataset).toEqual({test2: 'value2',test4: 'value4',test5: 'value5'// Add this line});});});
The text was updated successfully, but these errors were encountered:
…lement.dataset object. The changes will be reflected to the attributes of the element. Fixes issue with dataset keys not being in lower camel case. Improves performance of HTMLElement.getAttributeNS() which is used in many places within Happy DOM.
Hey there,
I stumbled upon an issue where assigned keys to
HTMLElement.dataset
are ignored.To reproduce the issue, you can extend this test case:
happy-dom/packages/happy-dom/test/nodes/html-element/HTMLElement.test.ts
Line 182 in bda5a7b
The text was updated successfully, but these errors were encountered: