Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/dom-renderer/domRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
} from './domRendererUtils.js';

// Feature detection for legacy brousers
const _styleRef: any =

Check warning on line 38 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type
typeof document !== 'undefined' ? document.documentElement?.style || {} : {};

const supportsObjectFit: boolean = 'objectFit' in _styleRef;
Expand Down Expand Up @@ -109,7 +109,7 @@
for (const prop in task.propsEnd) {
const start = task.propsStart[prop]!;
const end = task.propsEnd[prop]!;
(task.node.props as any)[prop] = interpolateProp(prop, start, end, t);

Check warning on line 112 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unsafe member access [prop] on an `any` value

Check warning on line 112 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type
}

updateNodeStyles(task.node);
Expand All @@ -134,7 +134,7 @@

constructor(
public node: DOMNode,
props: Partial<lng.INodeAnimateProps<any>>,

Check warning on line 137 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type
rawSettings: Partial<lng.AnimationSettings>,
) {
this.settings = {
Expand All @@ -152,7 +152,7 @@

for (const [prop, value] of Object.entries(props)) {
if (value != null && typeof value === 'number') {
this.propsStart[prop] = (node.props as any)[prop];

Check warning on line 155 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unsafe member access [prop] on an `any` value

Check warning on line 155 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type

Check warning on line 155 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unsafe assignment of an `any` value
this.propsEnd[prop] = value;
}
}
Expand Down Expand Up @@ -214,7 +214,7 @@

function animate(
this: DOMNode,
props: Partial<lng.INodeAnimateProps<any>>,

Check warning on line 217 in src/core/dom-renderer/domRenderer.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type
settings: Partial<lng.AnimationSettings>,
): lng.IAnimationController {
return new AnimationController(this, props, settings);
Expand Down Expand Up @@ -1232,7 +1232,11 @@
if (keyValue === undefined) {
node.div.removeAttribute('data-' + key);
} else {
node.div.dataset[key] = String(keyValue);
// dataset[key] requires key to already be camelCase (DOMStringMap rejects hyphenated
// property names outright, e.g. "section-id" -- SyntaxError: not a valid property
// name). Our data props are passed as data-attribute-style keys (kebab-case), so use
// setAttribute directly instead, consistent with the removeAttribute branch above.
node.div.setAttribute('data-' + key, String(keyValue));
}
}
}
Expand Down
Loading