Skip to content

Commit

Permalink
handle setElementAttribute for invalid elements
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Feb 6, 2024
1 parent cc3e8dc commit 952c4d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datex-bindings/dom-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ export class DOMUtils {

setElementAttribute<T extends Element>(element:T, attr:string, value:Datex.RefOrValue<unknown>|LazyPointer<unknown>|((...args:unknown[])=>unknown)|{[JSX_INSERT_STRING]:true, val:string}, rootPath?:string|URL):boolean|Promise<boolean> {

// not an element (e.g DocumentFragment)
if (!(element instanceof this.context.Element)) return false;

// valid attribute name?
// not an HTML attribute
if (!(
Expand Down

0 comments on commit 952c4d7

Please sign in to comment.