Skip to content

Commit

Permalink
include IDynamicNodeReference
Browse files Browse the repository at this point in the history
  • Loading branch information
eligrey committed Jul 24, 2024
1 parent da8cfa3 commit c92db5c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,10 @@ export interface InstantiatedPendingRequestProps {

/** The following IPendingEvent APIs are only available to overrides: */

/** All associated resolved request URLs. null = invalid URL */
/**
* All associated resolved request URLs. null = invalid URL or data: URL (parsing
* skipped to optimize performance)
*/
URLs: (URL | null)[];
/** Prevent credentials from being included in request */
omitCredentials(): boolean;
Expand Down Expand Up @@ -978,4 +981,24 @@ export interface IPendingCookieMutation
toJSON(): PendingCookieMutationJSON;
}

/** Interface for dynamic node references */
export interface IDynamicNodeReference {
/**
* Current node getter. This should always be used in `handleLiveMutation()`.
* @returns current node
*/
getNode(): Element;
/**
* Live node getter. Use this to apply mutations in `quarantine()`
* and `quarantineMutation()` handlers.
*
* `release()` must always be called after completing
* mutations using `getLiveNode()`.
* @returns live node
*/
getLiveNode(): Element;
/** Release & garbage-collect internal node reference */
release(): void;
}

/* eslint-enable max-lines */

0 comments on commit c92db5c

Please sign in to comment.