Skip to content

Commit

Permalink
Remove a couple of unused function parameters (#3716)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfagnani committed Mar 10, 2023
1 parent f2eb979 commit c10df5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .changeset/new-pillows-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
11 changes: 7 additions & 4 deletions packages/lit-html/src/lit-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const d =
: document;

// Creates a dynamic marker. We never have to search for these in the DOM.
const createMarker = (v = '') => d.createComment(v);
const createMarker = () => d.createComment('');

// https://tc39.github.io/ecma262/#sec-typeof-operator
type Primitive = null | undefined | boolean | number | string | symbol | bigint;
Expand Down Expand Up @@ -1398,8 +1398,11 @@ class ChildPart implements Disconnectable {
}
}

private _insert<T extends Node>(node: T, ref = this._$endNode) {
return wrap(wrap(this._$startNode).parentNode!).insertBefore(node, ref);
private _insert<T extends Node>(node: T) {
return wrap(wrap(this._$startNode).parentNode!).insertBefore(
node,
this._$endNode
);
}

private _commitNode(value: Node): void {
Expand Down Expand Up @@ -1467,7 +1470,7 @@ class ChildPart implements Disconnectable {
(node as Text).data = value as string;
} else {
if (ENABLE_EXTRA_SECURITY_HOOKS) {
const textNode = document.createTextNode('');
const textNode = d.createTextNode('');
this._commitNode(textNode);
// When setting text content, for security purposes it matters a lot
// what the parent is. For example, <style> and <script> need to be
Expand Down

0 comments on commit c10df5d

Please sign in to comment.