Skip to content

Commit

Permalink
Rename innerMorph to morphInner
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Apr 1, 2024
1 parent efeddc0 commit 227b8bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/morphlex.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ interface Options {
afterPropertyUpdated?: (node: Node, propertyName: PropertyKey, previousValue: unknown) => void;
}
export declare function morph(node: ChildNode, reference: ChildNode | string, options?: Options): void;
export declare function innerMorph(node: Element, reference: Element | string, options?: Options): void;
export declare function morphInner(node: Element, reference: Element | string, options?: Options): void;
export {};
8 changes: 4 additions & 4 deletions dist/morphlex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/morphlex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function morph(node: ChildNode, reference: ChildNode | string, options: O
}
}

export function innerMorph(node: Element, reference: Element | string, options: Options = {}): void {
export function morphInner(node: Element, reference: Element | string, options: Options = {}): void {
if (typeof reference === "string") {
const parsedReferenceNode = parseNodeFromString(reference);

Expand All @@ -84,10 +84,10 @@ export function innerMorph(node: Element, reference: Element | string, options:
if (isElement(node)) {
const originalAriaBusy = node.ariaBusy;
node.ariaBusy = "true";
new Morph(options).innerMorph([node, reference]);
new Morph(options).morphInner([node, reference]);
node.ariaBusy = originalAriaBusy;
} else {
new Morph(options).innerMorph([node, reference]);
new Morph(options).morphInner([node, reference]);
}
}

Expand Down Expand Up @@ -139,7 +139,7 @@ class Morph {
this.#morphNode(pair);
}

innerMorph(pair: NodeReferencePair<Element>): void {
morphInner(pair: NodeReferencePair<Element>): void {
if (isMatchingElementPair(pair)) {
this.#buildMaps(pair);
this.#morphMatchingElementContent(pair);
Expand Down

0 comments on commit 227b8bc

Please sign in to comment.