You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to run strictdom on a page that runs lazySizes framework to lazy-load elements into the DOM, and it threw errors like the following:
fastdom-strict.js:918 Uncaught Error: Can only get getBoundingClientRect during 'measure' phase
at error (fastdom-strict.js:918)
at Measure.test (fastdom-strict.js:580)
at HTMLDivElement.clone.value [as getBoundingClientRect] (fastdom-strict.js:552)
at checkElements (lazysizes.js:339)
at Object._ (lazysizes.js:554)
at init (lazysizes.js:633)
at lazysizes.js:673
Although LazySizes contains its own logic to handle layout thrashing, these errors make strictdom incompatible with lazySizes for detecting layout thrashing coming from other page elements.
Following the suggestion in the fastdom README that "Potentially a third-party library could depend on FastDom, and better integrate within an app that itself uses it," I opened a feature-request issue (aFarkas/lazysizes#396) requesting strictdom support in lazySizes. However, the author of that library commented,
strictdom does not test for layout thrashing, it tests for a rule that is a) unnecessary to avoid layout thrashing and even worse b) increases the potential of creating layout thrashing with other libs, especially animation libraries. At the end it tests for something, that should be seen as bad practice.
Not being an expert on layout-thrashing myself, could you offer a response to this author's criticism of strictdom, and/or think of a solution to the above incompatibility issue between lazySizes and strictdom? I'm hoping that untangling this conflict will help stabilize current best practices a bit.
The text was updated successfully, but these errors were encountered:
I attempted to run
strictdom
on a page that runslazySizes
framework to lazy-load elements into the DOM, and it threw errors like the following:Although LazySizes contains its own logic to handle layout thrashing, these errors make
strictdom
incompatible withlazySizes
for detecting layout thrashing coming from other page elements.Following the suggestion in the
fastdom
README that "Potentially a third-party library could depend on FastDom, and better integrate within an app that itself uses it," I opened a feature-request issue (aFarkas/lazysizes#396) requesting strictdom support in lazySizes. However, the author of that library commented,Not being an expert on layout-thrashing myself, could you offer a response to this author's criticism of
strictdom
, and/or think of a solution to the above incompatibility issue betweenlazySizes
andstrictdom
? I'm hoping that untangling this conflict will help stabilize current best practices a bit.The text was updated successfully, but these errors were encountered: