Skip to content
Draft
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
9 changes: 7 additions & 2 deletions 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 @@ -822,7 +822,6 @@
if (!node.imgEl) {
node.imgEl = document.createElement('img');
node.imgEl.alt = '';
node.imgEl.crossOrigin = 'anonymous';
node.imgEl.setAttribute('aria-hidden', 'true');
node.imgEl.setAttribute('loading', 'lazy');
node.imgEl.removeAttribute('src');
Expand Down Expand Up @@ -944,7 +943,6 @@
if (!node.imgEl) {
node.imgEl = document.createElement('img');
node.imgEl.alt = '';
node.imgEl.crossOrigin = 'anonymous';
node.imgEl.setAttribute('aria-hidden', 'true');
node.imgEl.setAttribute('loading', 'lazy');
node.imgEl.removeAttribute('src');
Expand Down Expand Up @@ -1472,6 +1470,13 @@
this.hideMaskedBackgroundLayer();
this.imgEl.style.display = '';
this.imgEl.dataset.pendingSrc = pendingSrc;
// crossOrigin + data: URI fails to load on old WebKit engines (e.g. PS4 WebMAF) —
// only request CORS for real network sources, never for inlined base64 images.
if (pendingSrc.startsWith('data:')) {
this.imgEl.removeAttribute('crossorigin');
} else {
this.imgEl.crossOrigin = 'anonymous';
}
this.imgEl.src = pendingSrc;
this.imgEl.dataset.rawSrc = pendingSrc;
this.imgEl.dataset.pendingSrc = '';
Expand Down
Loading