mirror of
https://github.com/morluto/rea.git
synced 2026-11-06 14:56:32 +00:00
fix(javascript): qualify renderer endpoint observations
This commit is contained in:
1 parent
9cad06db10
commit
0e1500dc8d
4 files changed
+99
-8
No files matched your search
@@ -657,7 +657,7 @@ const isKeyedCollectionReceiver = (callee: t.Node): boolean => {
|
||||
);
|
||||
};
|
||||
|
||||
/** A literal endpoint shape or an ambiguous argument of an HTTP-method-named call. */
|
||||
/** A literal endpoint shape or an argument whose callee spelling is unproven. */
|
||||
export interface JavaScriptEndpointArgument {
|
||||
readonly kind: "endpoint" | "candidate";
|
||||
readonly value: string;
|
||||
@@ -728,8 +728,10 @@ export const endpointArgument = (
|
||||
// Beacon URLs are endpoint observations, retaining the upstream API support.
|
||||
if (name === "sendBeacon" || name.endsWith(".sendBeacon"))
|
||||
return literal(stringValue(args[0]));
|
||||
if (name === "loadURL" || name.endsWith(".loadURL"))
|
||||
return literal(stringValue(args[0]));
|
||||
if (name === "loadURL" || name.endsWith(".loadURL")) {
|
||||
const value = stringValue(args[0]);
|
||||
return value === undefined ? undefined : { kind: "candidate", value };
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user