public class RequireLazilyTagWriter extends Object
This strategy reverts URLs for CSS/JS batches back in to the various requested keys that created them, then uses those to write some <code>WRM.require(requestedKeys)</code> JavaScript calls.
If constructed with a UrlMode, it may also write prefetch links for the URLs, assuming that's good for performance.
This strategy intentionally makes it the client-side's responsibility to request and load all interactive resources. In the long run, it might not be a great idea. However, for the moment, it helps us work around more rigid internals in the WRM.
| Constructor and Description |
|---|
RequireLazilyTagWriter(UrlMode urlMode) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(ResourceUrls resourceUrls)
Converts a certain resource into html import tag and format it according to its url extension.
|
boolean |
matches(String resourceName)
Identifies whether the extesion handlded by the formater matches the resource name.
|
@Nonnull public String format(@Nonnull ResourceUrls resourceUrls)
resourceUrls - The resource to be formatted.public boolean matches(@Nonnull String resourceName)
resourceName - The resource name.true: The resouerce name matches the formatter's.
false: The resouerce name does not match the formatter's.
Copyright © 2024 Atlassian. All rights reserved.