diff --git a/examples/adding-content/index.js b/examples/adding-content/index.js index 26e04a8..6dd2a64 100644 --- a/examples/adding-content/index.js +++ b/examples/adding-content/index.js @@ -1,16 +1,13 @@ window.ctDebug = true; -// const observer = new ContainerPerformanceObserver((list) => { -// list.getEntries().forEach((entry) => { -// console.log(entry); -// }); -// }); +const queryString = window.location.search; +const urlParams = new URLSearchParams(window.location.search); +const nestedStrategy = urlParams.get("nestedStrategy") || "ignore" const nativeObserver = new PerformanceObserver((v) => { console.log(v.getEntries()); }); -nativeObserver.observe({ entryTypes: ["container"] }); -// observer.observe({ nestedStrategy: "transparent" }); +nativeObserver.observe({ type: "container", nestedStrategy: nestedStrategy }); window.setTimeout(() => { const innerContainer = document.querySelector(".container div"); diff --git a/index.html b/index.html index b869f73..fbddab0 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,10 @@