Repository navigation
feat: add JsModuleInvokers and Page.executeModuleJs - #27492
Conversation
A JavaScript definition that extends JsModuleInvokers calls what one module exports, with that module as `this`. The module is named by the one @JsDefinitionImport of the interface that imports no names; other imports with names work as on a JsInvokers definition. A method without @JsExpression calls the export of the same name. The marker does not extend JsInvokers, so Element.executeJs refuses a module definition at compile time. checkDefinition refuses an interface that extends more than one marker, and a module definition whose declaring interfaces import zero or several modules without names. The import of `this` is part of the hashed imports, so the same JavaScript run on an element stays another function. Existing tests that asserted the wording of the "neither" and "both" marker errors now assert the wording that also covers the third marker. Part of #27425
Also asserts the message of creating invokers from a module definition rather than only the marker it names.
Type of change
How to test
API changes// com.vaadin.flow.js.JsModuleInvokers — Added
public interface JsModuleInvokers extends Serializable
// com.vaadin.flow.component.page.Page — Added
public <T extends JsModuleInvokers> T executeModuleJs(Class<T> definitionType)
// com.vaadin.flow.js.JsDefinitionProxy — Added (internal use)
public static <T extends JsModuleInvokers> T createModuleInvokers(Class<T> definitionType, SerializableFunction<JsCall, PendingJavaScriptResult> runner)
MODULE_CALLS // new constant of the public enum Kind
// com.vaadin.flow.js.internal.JsDefinitionImports — Added (internal)
public static final String THIS |
|
Added parentheses around the concatenated first branch of the ternary in the marker check message, so the precedence is explicit. The message itself is unchanged. |
|
Two small points from a review of 858e845. Neither blocks the PR. 1. @JsDefinition
@JsStringFallback
@JsDefinitionImport(from = "./grid-connector.js")
public interface GridConnectorJs extends JsModuleInvokers { ... }
2. The Javadoc of
One or two sentences in the Javadoc, for example: " |
The combination failed on the import checks instead: first on the import that binds this, then, once it was removed, on the missing one. Refuse the annotation itself before those checks. Also document in JsModuleInvokers that this is the module namespace object.
|
@mcollovati Both done.
|
|
The Javadoc of
Here is a proposal for the whole Javadoc. The order is: what the method does, when to use it and how it differs from /**
* Returns an instance of the given interface that queues calls to the
* functions of a JavaScript module. In the JavaScript of a call, the module
* is <code>this</code>.
* <p>
* Use this method when the JavaScript you call is in a module, for example
* the connector of a component. Use {@link #executeJs(Class)} when the
* JavaScript works on global objects, such as <code>document</code> or
* <code>navigator</code>. The differences between the two methods are:
* <ul>
* <li>Here, <code>this</code> is the module. With {@link #executeJs(Class)},
* <code>this</code> is not a particular object.</li>
* <li>Here, a method without {@link JsExpression} calls the function of the
* module with the same name. {@link #executeJs(Class)} refuses such a
* method.</li>
* <li>The interface extends {@link JsModuleInvokers} here, and
* {@link JsInvokers} for {@link #executeJs(Class)}. One interface can not be
* used with both methods.</li>
* </ul>
* Everything else works the same way: the arguments, the return types, how
* the build collects the JavaScript, and that no JavaScript is compiled in
* the browser.
* <p>
* Calling a method of the instance adds a call to the queue. The queued calls
* are sent to the browser with the response to the current request, and run
* there. In the JavaScript, <code>this</code> is the module, and the
* arguments of the method are <code>$0</code>, <code>$1</code> and so on. A
* method without {@link JsExpression} calls the function of the module that
* has the same name, as <code>this.name(...)</code>. A method with
* {@link JsExpression} runs that JavaScript instead, for example to call a
* function with other arguments, or more than one function.
*
* <pre>
* @JsDefinition
* // The module: this in the JavaScript of each method
* @JsDefinitionImport(from = "./grid-connector.js")
* // Another module: formatRow can be used by name
* @JsDefinitionImport(from = "./grid-format.js", exports = "formatRow")
* public interface GridConnectorJs extends JsModuleInvokers {
*
* // runs this.initLazy($0)
* void initLazy(Element grid);
*
* @JsExpression("this.setRowFormatter($0, formatRow)")
* void useRowFormatter(Element grid);
* }
*
* page.executeModuleJs(GridConnectorJs.class).initLazy(grid.getElement());
* </pre>
*
* The interface must:
* <ul>
* <li>be annotated with {@link JsDefinition},</li>
* <li>extend {@link JsModuleInvokers}, and no other marker interface,</li>
* <li>name its module with {@link JsDefinitionImport}<code>(from = ...)</code>,
* without <code>defaultExport</code>, <code>namespace</code> or
* <code>exports</code>. This import is required, and only one import of the
* interface can be written this way.</li>
* </ul>
* The interface can import other modules too. Each of these imports must set
* <code>defaultExport</code>, <code>namespace</code> or <code>exports</code>,
* and the JavaScript of a method uses what it imports by those names. See
* {@link JsModuleInvokers} for when the modules are loaded.
*
* @param <T>
* the type of the interface
* @param definitionType
* the interface that describes the module, not <code>null</code>
* @return an instance of the interface, not <code>null</code>
* @throws IllegalArgumentException
* if the interface does not follow the rules above, or if a
* method returns something other than <code>void</code>,
* <code>JavaScriptResult</code> or
* <code>PendingJavaScriptResult</code>
*/Other changes:
|
Say when to use it instead of executeJs(Class) and how the two differ, list what the interface needs, and say in the @throws of the definition methods which return types are allowed instead of 'can not be answered'.
|
@mcollovati Done, thanks for the proposal.
The latest merge from |
vaadin-review-bot
left a comment
There was a problem hiding this comment.
Reviewed the changes — left 1 comment.
| Finding | |
|---|---|
| 📝 | A module definition cannot inherit methods unless the extended interface repeats the module import, which no doc mentions and no test pins |
| * <ul> | ||
| * <li>be annotated with {@link JsDefinition},</li> | ||
| * <li>extend {@link JsModuleInvokers}, and no other marker interface,</li> | ||
| * <li>name its module with |
There was a problem hiding this comment.
📝 A module definition cannot inherit methods unless the extended interface repeats the module import, which no doc mentions and no test pins
checkModuleImport runs for every interface that declares methods of the definition, so the documented inheritance pattern
public interface ConnectorBaseJs extends JsModuleInvokers {
void initLazy(Element e);
}
@JsDefinition
@JsDefinitionImport(from = "./grid-connector.js")
public interface GridConnectorJs extends ConnectorBaseJs { ... }is refused with "extends ConnectorBaseJs, which imports no module". The base interface has to carry the same no-name import.
The new docs state the import as a property of "the interface", and the Inheritance section of JsDefinition, which this PR extended to cover executeModuleJs, still promises that inherited methods work as if the definition declared them. Refusing is the right call (the inherited method would otherwise be generated with no module and run with this null), but the rule is worth stating, and the only module-import tests use definitions that declare their methods themselves.
Page.java:662 · documentation
There was a problem hiding this comment.
Agreed, the refusal stays and the rule is now documented and tested.
Page.executeModuleJs,JsModuleInvokersand the Inheritance section of@JsDefinitionnow say that imports are not inherited. The import without names goes on each interface that declares methods, the definition itself or one it extends, and its methods run with that module asthis. An interface that declares no methods, such as a definition that only inherits them, has no such import.- Tests: an extended interface without the import is refused with "extends …, which imports no module". A parent and child that each have their own import pass. A runtime test checks that an inherited method runs on the parent's module and the child's own method on the child's module.
Imports are not inherited, so an interface that declares methods of a JsModuleInvokers definition is refused unless it names the module too. State this in the Javadoc and test both the refused and the accepted case.
… call The import goes on every interface that declares methods, and need not be the definition's module. Test that an inherited method runs on the module of the interface that declares it.
vaadin-review-bot
left a comment
There was a problem hiding this comment.
Reviewed the changes — collected 1 finding below that could not be attached to the diff.
| Finding | |
|---|---|
| 📝 | The wire-protocol chapter still lists only Element.executeJs(Class) and Page.executeJs(Class) as the declared-JavaScript entry points |
📝 The wire-protocol chapter still lists only Element.executeJs(Class) and Page.executeJs(Class) as the declared-JavaScript entry points
## executeJs over the wire enumerates the ways to run JavaScript and names JsInvokers as the marker for declared JavaScript. Page.executeModuleJs(Class) with JsModuleInvokers is a third entry point with the same wire shape, and the later note "null as the element for Page.executeJs(Class)" now covers it too.
guidelines/browser-integration.md:58 points at the same JsInvokers-only wording.
wire-protocol.md:284 · documentation
It is a third entry point for declared JavaScript, with the same wire shape as Page.executeJs(Class).
|
Updated the guidelines. In |
vaadin-review-bot
left a comment
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
|
A note for when #27491 is merged. #27491 leaves out of the bundle the methods whose For a module definition this matters more: when the file of the import without names is missing, every method that the interface declares throws, since all of them run with that module as Proposal, as the last paragraph before the tags of * <p>
* When the build can not find the file of a module that the interface
* imports, it leaves the methods of the interface out of the bundle and logs
* an error. Each call of such a method then throws an
* {@link IllegalStateException} that names the module. When the missing file
* is the module that is <code>this</code>, this applies to every method of the
* interface. See {@link JsDefinitionImport} for which files the build checks.
|
…okers # Conflicts: # flow-server/src/main/java/com/vaadin/flow/component/page/Page.java
The hotswap test from main still expected 'extends neither', which this branch replaced with 'extends none of JsInvokers, JsModuleInvokers and JsSnippets'.
Also name JsModuleInvokers in the build error for @JsDefinitionImport on a class, next to JsInvokers.
|
@mcollovati #27491 is merged now, so I merged
One open point in the code from #27491, not changed here: the dev-bundle check compares the list of unresolved functions, so in development mode a change in that list makes the precompiled dev bundle rebuild. At runtime, development mode reads that list from the project files, not from the bundle, so the rebuild may not be needed. |
|
One small wording point in the new text about inheritance, in
This reads as a description, but it is a rule: The list item in * <li>name its module with
* {@link JsDefinitionImport}<code>(from = ...)</code>, without
* <code>defaultExport</code>, <code>namespace</code> or
* <code>exports</code>. This import is required, and only one import of the
* interface can be written this way.</li>
* <li>not be annotated with {@link JsStringFallback}.</li>
* </ul>
* Imports are not inherited. When methods are declared in an interface that
* the definition extends, that interface needs its own import without names,
* and its methods run with that module as <code>this</code>. An interface
* that declares no methods, such as a definition that only inherits them,
* must not have any {@link JsDefinitionImport}.And in * Imports are not inherited. Each interface that declares methods of the
* definition, the definition itself or one it extends, needs its own
* {@link JsDefinitionImport} without names, and its methods run with that
* module as <code>this</code>. An interface that declares no methods, such as
* a definition that only inherits them, must not have any
* {@link JsDefinitionImport}.The sentence "An interface whose methods would have no module as |
vaadin-review-bot
left a comment
There was a problem hiding this comment.
Reviewed the changes — left 2 comments and collected 1 finding below that could not be attached to the diff.
| Finding | |
|---|---|
| 📝 | The documented connector idiom passes an Element that silently arrives as null when the element is detached, and a shorthand method leaves no place to guard |
| 📝 | JsInvokers and JsSnippets still describe a world of two marker interfaces |
| 🧪 | No test renders a module definition whose only import is the module itself, the canonical shape |
📝 JsInvokers and JsSnippets still describe a world of two marker interfaces
JsInvokers says "An interface whose methods only answer with snippets extends JsSnippets instead. An interface can not extend both", and never mentions JsModuleInvokers — no @see either. JsSnippets:32 says "An interface can not extend both marker interfaces", which is now a wrong count.
The PR updated the equivalent wording in JsDefinition, JsExpression, JsDefinitionImport and JsStringFallback, so these two are the odd ones out — and JsInvokers is where a developer choosing a marker is most likely to land.
JsInvokers.java:52 · documentation
| * void useRowFormatter(Element grid); | ||
| * } | ||
| * | ||
| * page.executeModuleJs(GridConnectorJs.class).initLazy(grid.getElement()); |
There was a problem hiding this comment.
📝 The documented connector idiom passes an Element that silently arrives as null when the element is detached, and a shorthand method leaves no place to guard
NodeSerializer writes null for a detached node, and a call queued through the page is owned by the root node, so it is always sent. The javadoc example page.executeModuleJs(GridConnectorJs.class).initLazy(grid.getElement()) therefore runs this.initLazy(null) whenever the grid is not attached at flush time (attach plus detach in the same round trip, or a call made before attach).
This is new ground rather than the Page.executeJs(Class) status quo: that method refuses methods without @JsExpression, so every page-level call has an author-written expression where a guard fits. Flow-components does exactly that today — GridJs.initConnector is @JsExpression("if ($0) window.Vaadin.Flow.gridConnector.initLazy($0)"). The shorthand form that executeModuleJs encourages generates return this.initLazy($0); with nowhere to put the check.
Worth a sentence in the javadoc of executeModuleJs and JsModuleInvokers saying an element argument is null unless attached when the invocation is sent, and that a method needing a guard declares it with @JsExpression.
Page.java:661 · documentation
There was a problem hiding this comment.
Added. Page.executeModuleJs and JsModuleInvokers now say that an Element argument is null in the browser when the element is not attached at the time the call is sent. A method that has to guard against that declares its JavaScript with @JsExpression, for example @JsExpression("if ($0) this.initLazy($0)").
| } | ||
| } | ||
| String call = " }).call(" + self | ||
| + (values.isEmpty() ? "" : (", " + String.join(", ", values))) |
There was a problem hiding this comment.
🧪 No test renders a module definition whose only import is the module itself, the canonical shape
The new values.isEmpty() branch produces }).call($modules[0]);. Every rendering test still ends in .call(this, …) or .call($modules[0], $modules[1]); MissingThisModuleJs has the right shape but its module is unresolved, so no body is rendered, and the strict-CSP IT definition imports a second module with a name.
So the exact definition the PR documents — @JsDefinitionImport(from = "./grid-connector.js") and nothing else — never has its generated JavaScript asserted anywhere. A malformed argument list there would be a syntax error that takes the whole definitions file with it, and nothing would fail.
There was a problem hiding this comment.
Added. moduleDefinition_callsTheExportWithTheModuleAsThis now also renders a definition whose only import is the module, and asserts the whole function, ending in }).call($modules[0]);.
Also say that a detached element argument is null and where to guard against it, name JsModuleInvokers in JsInvokers and JsSnippets, and test the function of a module definition that imports only its module.
|
@mcollovati Done. Both texts are now yours. In Also in this push:
|
vaadin-review-bot
left a comment
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
|
Add Page.executeModuleJs(Class) and the JsModuleInvokers marker to Accessing the Browser Page, and mention the third marker interface alongside JsInvokers and JsSnippets in Calling JavaScript from the Server. Documents vaadin/flow#27492 (`6333b7d89aa0ad3f3d83f53799d449f4767436e0`).
|
Pull request created: #6805
|
|
Documentation Bot: Draft documentation pull request for this change: vaadin/docs#6805 Files updated:
It was written from the state of this pull request as you see it now. Please review it and mark it ready for review.
|
Part of #27425 **new feature** · flow-server · apps and components that call what a JavaScript module exports, such as component connectors **Background — JavaScript definitions.** A `@JsDefinition` interface declares JavaScript that the build bundles, so the server sends only a function id and nothing is compiled in the browser. `@JsDefinitionImport` gives that JavaScript names from a module. Adds a third kind of definition that calls the exports of one module, with the module as `this`. A method without `@JsExpression` calls the export of the same name. This PR loads the modules on the first call, like other imports. The stacked PR on top loads them with the view, so calls run in order. ```java @JsDefinition @JsDefinitionImport(from = "./grid-connector.js") public interface GridConnectorJs extends JsModuleInvokers { void initLazy(Element grid); // return this.initLazy($0) } page.executeModuleJs(GridConnectorJs.class).initLazy(grid.getElement()); ``` **Risks:** -⚠️ Public API: new `JsModuleInvokers`, `Page.executeModuleJs`, and a new constant `MODULE_CALLS` in the public `JsDefinitionProxy.Kind` enum, which can break an exhaustive `switch` over it in user code. -⚠️ Behaviour change: the error for an interface that extends no marker, or more than one, has new wording, since there are now three markers. - ✅ No serialization, threading, security or migration concerns. - Added `JsModuleInvokers`, a marker that does not extend `JsInvokers`, so `Element.executeJs` refuses it at compile time. - Added `Page.executeModuleJs(Class)` and `JsDefinitionProxy.createModuleInvokers`. - `checkDefinition` refuses an interface that extends more than one marker, and a module definition whose declaring interfaces import zero or several modules without names. It also refuses a module definition annotated with `@JsStringFallback`, before the import checks, since a string call has no module as `this`. - The import without names is part of the hashed imports, so the same JavaScript run on an element stays a different function. - The generated function runs the JavaScript with that module as `this`. - Updated the Javadoc of `@JsDefinition`, `@JsDefinitionImport` (its example no longer shows connector code), `@JsExpression`, and the `@throws` that list the markers. `JsModuleInvokers` says that `this` is the module namespace object (named exports only, a default export is `this.default`, and it can not be changed), and `@JsStringFallback` says it can not mark a module definition. The Javadoc of `Page.executeModuleJs` says when to use it instead of `Page.executeJs(Class)` and lists what the interface needs, and the docs say that imports are not inherited, so each interface that declares methods of a module definition names its own module, and one that declares no methods must have no import. They also say that a detached `Element` argument arrives as `null`, and that a method that has to guard against it declares its JavaScript with `@JsExpression`. `JsInvokers` and `JsSnippets` now name `JsModuleInvokers` as the third marker. The `@throws` of the definition methods name the allowed return types. - When the build can not find the file of a module that a module definition imports, the methods its interface declares are left out of the bundle and each call throws an `IllegalStateException` that names the module, as for other imports. For the module that is `this`, that is every method the interface declares. The Javadoc of `Page.executeModuleJs` and `JsModuleInvokers` says so, and the build error for `@JsDefinitionImport` on a class now names `JsModuleInvokers` too. - Updated the wire-protocol and browser-integration guidelines to list `Page.executeModuleJs(Class)` and `JsModuleInvokers`. - Existing tests that checked the old wording of the marker errors now check the new wording. - Added a strict-CSP production IT that calls an export directly and through an expression. Working on behalf of @mcollovati --------- Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
) (CP: 25.4) Fixes #27425, Depends on #27492 **behavior deviation** · flow-build-tools · apps and components that set up a connector through `JsModuleInvokers` and call it in the same round trip **Background — call order.** The client runs the calls of a message one after the other without awaiting them. A call that waits for `import()` therefore runs its JavaScript after the calls that follow it. A call through `Page.executeModuleJs` now runs before the calls made after it in the same round trip. The build loads their modules with the views that use them, the same way as `@JsModule`, so a call does not wait. A call made where no shown view loaded the module still works, but runs late once, and logs a warning in the browser. In production the warning says no view shown so far loaded the module, or that the build could not find the path, for example one that only an alias resolves. In development it says a restart registers it after a hotswap, or that the build could not find or check the path, such as one reached through an alias. A missing `./` file never gets there: it stops the build (#27568). **Risks:** -⚠️ Limit: an `Element.executeJs` call made *before* a module call in the same round trip still runs after it. Element calls are queued when the response is written, and page calls are queued when they are made, the same as `Page.executeJs` today. The Javadoc says so. -⚠️ Behaviour change: the modules of a module definition now load with the route's chunk, or at startup for an eager route and in development mode, not on the first call. In development mode and in a production build that does not optimize the bundle, the build does not tell views apart, so the modules of every module definition on the class path load at startup, also those no view uses, and their top-level code runs then. -⚠️ The fallback warning names the module path, not the Java definition, because production bundles never name Java classes. The issue asked to name the definition. -⚠️ Known limit, checked by hand in development mode: a hotswap that only redefines classes does not update the registrations. Calls still work, but the first call on each page runs late and logs a warning until a restart. A restart, or an edit of the module file, registers the module again. - ⏱️ Every generated definitions file gets two more header lines. A chunk gets one import per module of the definitions it reaches. - ✅ No API, serialization, threading or security concerns. **Context.** The bundle check needs no new rule for when to rebuild. The function ids hash the imports, so a definition or import change already forces a rebuild, and the rebuild writes the registrations. The check, and the Vite plugin that writes the imports of a bundle into its stats, now read imports in either quote and undo the escapes of double-quoted ones, since the registrations of definition modules are written that way. The check also finds a project module imported without its extension the way Vite does. - Added `groupByChunk` to the frontend scanner. It uses the same reachability as `@JsModule` to tell which chunks reach a class. - The imports file and the route chunks import the modules of each reached `JsModuleInvokers` definition and register them in `window.Vaadin.Flow.jsDefinitionModules`, keyed by the resolved import path. - The build finds a module the way Vite does: by its path as written, with one of Vite's default extensions (`.mjs`, `.js`, `.mts`, `.ts`, `.jsx`, `.tsx`, `.json`), or as a folder's index file. A subpath of an installed package whose package.json has an `exports` field is found through that field alone, as the bundler resolves it. A `./` file from a jar must be named exactly as it is, as the generator requires. - A module the build can not find gets no static import, because that import would fail the Vite build. A `./` file of the project or a jar that the build can not find stops the build (#27568). The chunk writer checks such a file the same way the generator does, so the two agree. Any other path the build can not find, such as one reached through a Vite alias, is loaded by the call. - The generated function takes its modules from that registry without awaiting. Only when a module is missing does it load the missing ones in parallel, warn once per module, and register them for later calls. - Named imports of `JsInvokers` definitions are not changed. They still load on the first call. - Documented the loading, call order, fallback and limits in `JsModuleInvokers`, `@JsDefinition` and `Page.executeModuleJs`. - `AbstractUpdateImportsTest` builds its options through a helper, so a test can use the same class finder for the options and the scanner. - Strict-CSP production ITs check call order when the view is shown and later. They also check a call to a module that only another view registers, which loads it once, warns once, and runs later calls in order. They fail when the chunk registration is turned off. Working on behalf of @mcollovati --------- Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>



Part of #27425
new feature · flow-server · apps and components that call what a JavaScript module exports, such as component connectors
Background — JavaScript definitions. A
@JsDefinitioninterface declares JavaScript that the build bundles, so the server sends only a function id and nothing is compiled in the browser.@JsDefinitionImportgives that JavaScript names from a module.Adds a third kind of definition that calls the exports of one module, with the module as
this. A method without@JsExpressioncalls the export of the same name. This PR loads the modules on the first call, like other imports. The stacked PR on top loads them with the view, so calls run in order.Risks:
JsModuleInvokers,Page.executeModuleJs, and a new constantMODULE_CALLSin the publicJsDefinitionProxy.Kindenum, which can break an exhaustiveswitchover it in user code.✅ No serialization, threading, security or migration concerns.
Added
JsModuleInvokers, a marker that does not extendJsInvokers, soElement.executeJsrefuses it at compile time.Added
Page.executeModuleJs(Class)andJsDefinitionProxy.createModuleInvokers.checkDefinitionrefuses an interface that extends more than one marker, and a module definition whose declaring interfaces import zero or several modules without names. It also refuses a module definition annotated with@JsStringFallback, before the import checks, since a string call has no module asthis.The import without names is part of the hashed imports, so the same JavaScript run on an element stays a different function.
The generated function runs the JavaScript with that module as
this.Updated the Javadoc of
@JsDefinition,@JsDefinitionImport(its example no longer shows connector code),@JsExpression, and the@throwsthat list the markers.JsModuleInvokerssays thatthisis the module namespace object (named exports only, a default export isthis.default, and it can not be changed), and@JsStringFallbacksays it can not mark a module definition. The Javadoc ofPage.executeModuleJssays when to use it instead ofPage.executeJs(Class)and lists what the interface needs, and the docs say that imports are not inherited, so each interface that declares methods of a module definition names its own module, and one that declares no methods must have no import. They also say that a detachedElementargument arrives asnull, and that a method that has to guard against it declares its JavaScript with@JsExpression.JsInvokersandJsSnippetsnow nameJsModuleInvokersas the third marker. The@throwsof the definition methods name the allowed return types.When the build can not find the file of a module that a module definition imports, the methods its interface declares are left out of the bundle and each call throws an
IllegalStateExceptionthat names the module, as for other imports. For the module that isthis, that is every method the interface declares. The Javadoc ofPage.executeModuleJsandJsModuleInvokerssays so, and the build error for@JsDefinitionImporton a class now namesJsModuleInvokerstoo.Updated the wire-protocol and browser-integration guidelines to list
Page.executeModuleJs(Class)andJsModuleInvokers.Existing tests that checked the old wording of the marker errors now check the new wording.
Added a strict-CSP production IT that calls an export directly and through an expression.
Working on behalf of @mcollovati