fitContentJs constant

String const fitContentJs

Implementation

static const fitContentJs = """
(function() {
 let maxRight = 0;
 let maxBottom = 0;

  document.body.querySelectorAll('*').forEach(el => {
  const rect = el.getBoundingClientRect();
  maxRight = Math.max(maxRight, rect.right);
  maxBottom = Math.max(maxBottom, rect.bottom);
  });

  return [maxRight, maxBottom];
  })();
""";