PSDTools / psdtools.github.io

Our websites.
1 stars 0 forks source link

Use QuerySelector API #4

Closed lishaduck closed 2 months ago

lishaduck commented 6 months ago

https://github.com/PSDTools/psdtools.github.io/blob/a649be10c44975b015a75113f012b234d642639c/packages/gpa-calculator/src/data/utils.ts#L1-L2

We can gain a lot more flexibility by exposing a querySelector function rather than a more restricted getElementById. Additionally, we might be able to use it to automatically infer the type when using element selectors, which can be be done with querySelector. That'd be a really nice QoL enhancement.

lishaduck commented 2 months ago

The mention of inferred types is a reference to g-plane/typed-query-selector.

lishaduck commented 2 months ago

Fixed in aa36e10bb48a4bb06586b04f5e8c7b874266c19e, 7b379effee97e41fac4f5021020117ef07370768, and 3de7ac6d7e02a32a7c367f3ce04e4a554f82c106.