15:36
<sideshowbarker>

If someone familiar with image lazy loading could take a minute to look at https://github.com/mdn/content/pull/28077 and comment, that would be great. That change is adding this note:

Note: Images that have loading set to lazy will never be loaded if their width or height is 0, even if loading them would change that.

15:39
<Eric Portis (he/him)>
sideshowbarker: This isn't an answer, but IIRC it's based on IntersectionObserver, I wonder if that's spec'd to fire when elements have no area
15:39
<sideshowbarker>
aha
15:45
<sideshowbarker>
from a quick read through https://w3c.github.io/IntersectionObserver/#run-the-update-intersection-observations-steps, I can’t tell
15:50
<Eric Portis (he/him)>
sideshowbarker: Because the lazyload spec uses the default threshold of zero, I think it is supposed to fire: https://wpt.fyi/results/intersection-observer/same-document-zero-size-target.html
15:51
<Eric Portis (he/him)>
I'll comment and if I'm wrong maybe somebody else will chime in (:
15:51
<sideshowbarker>
Cheers and thanks 👍
21:08
<Ian Hickson>
does JS support 64 bit numbers yet?
21:10
<Ian Hickson>
i'm trying to parse a binary data format that uses quadwords as the main building block
21:19
<Richard Gibson>
Ian Hickson: are you looking for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array and/or https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array ?
21:21
<Ian Hickson>
ideally i would like to be able to store a 64 bit int in a variable and do maths with it
21:24
<Richard Gibson>
yes, that is possible with BigInt
21:58
<Richard Gibson>

for example:

// Make an array-like view over a byte buffer containing the data for
// 3 big-endian uint64s with the first two set to 2**63 - 1.
const uint8View = new Uint8Array([
  127, ...Array(7).fill(255),
  127, ...Array(7).fill(255),
  ...Array(8),
]);
const dataView = new DataView(uint8View.buffer);
const uint64View = {
  get: i => dataView.getBigUint64(i * 8),
  set: (i, n) => dataView.setBigUint64(i * 8, n),
};

// Read the first two values and set the third to their sum.
const a = uint64View.get(0);
const b = uint64View.get(1);
assert(a === 2n ** 63n - 1n, "a");
assert(b === 2n ** 63n - 1n, "b");
const c = a + b;
uint64View.set(2, c);

// Verify the results from both perspectives.
assert(uint64View.get(2) == 2n ** 64n - 2n, "c");
assert.deepEqual(uint8View.slice(0, 8), [127, ...Array(7).fill(255)], "a bytes");
assert.deepEqual(uint8View.slice(8, 16), [127, ...Array(7).fill(255)], "b bytes");
assert.deepEqual(uint8View.slice(16, 24), [...Array(7).fill(255), 254], "c bytes");