Skip to content

Commit

Permalink
feat(hdom): add scrollTop/Left property support in setAttrib()
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 10, 2019
1 parent 3e48f6c commit 895da65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/hdom/src/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ export const setAttrib =
case "value":
updateValueAttrib(<HTMLInputElement>el, val);
break;
case "id":
case "checked":
case "scrollTop":
case "scrollLeft":
// TODO add more native attribs?
el[id] = val;
break;
Expand Down
3 changes: 3 additions & 0 deletions packages/hdom/src/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const isPlainObject = iso;
* ["div.bar.baz", {class: "foo"}] => ["div", {class: "foo bar baz"}]
* ```
*
* Elements with `__skip` attrib enabled and no children, will have an
* empty text child element injected.
*
* @param spec
* @param keys
*/
Expand Down

0 comments on commit 895da65

Please sign in to comment.