Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
- Move polyfill into its own folder
- fix up shadowed diagram to show title of inner
  • Loading branch information
jwilliams720 committed Aug 21, 2024
1 parent 33d03c2 commit 3930758
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 188 deletions.
7 changes: 4 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"tasks": [
{
"type": "npm",
"script": "build",
"script": "watch",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build",
"detail": "tsc"
"label": "npm: watch",
"detail": "tsc",
"path": "/polyfill"
}
]
}
2 changes: 1 addition & 1 deletion docs/img/nested-shadowed-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/img/nested-shadowed-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/adding-content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="../../polyfill.js"></script>
<script src="../../polyfill/polyfill.js"></script>
<title>Adding Content to a component</title>
<style>
.container {
Expand Down
4 changes: 2 additions & 2 deletions examples/shadow-dom/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="../../polyfill.js"></script>
<script src="../../polyfill/polyfill.js"></script>
<title>Document</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions examples/svg/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="../../polyfill.js"></script>
<script src="../../polyfill/polyfill.js"></script>
<title>Document</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/table/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<script src="../../polyfill.js"></script>
<script src="../../polyfill/polyfill.js"></script>
<title>Document</title>
</head>
<body>
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 1 addition & 8 deletions polyfill.ts → polyfill/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ interface ResolvedRootData extends PerformanceContainerTiming {
paintedRects: Set<DOMRectReadOnly>;
/** For aggregated paints keep track of the union painted rect */
coordData?: any;
/** For aggregated paints keep track of the union painted rect */
batchCoordData?: any;
}

type ObserveOptions = {
Expand Down Expand Up @@ -344,12 +342,7 @@ class ContainerPerformanceObserver {
* @param {PerformanceObserverEntryList} list
*/
callbackWrapper(list: PerformanceObserverEntryList) {
// Reset coordData for each container
containerRootDataMap.forEach((val) => {
val.batchCoordData = null;
});

// Have any containers been updated?
// Use this to keep track of container updates, clear it after each paint batch
containerRootUpdates.clear();

// Reset last resolved data state, we want to re-use coordinate and size if aggregated
Expand Down
168 changes: 0 additions & 168 deletions presentation.md

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"lib": ["DOM", "ES2023"],
"sourceMap": true
},
"files": ["./polyfill.ts"]
"files": ["polyfill/polyfill.ts"]
}

0 comments on commit 3930758

Please sign in to comment.