fallbackBundleUri static method

Uri fallbackBundleUri([
  1. double? id
])

Creates a fallback URI for WebF bundle content.

Generates a URI in the format vm://bundle/[id] that serves as a virtual origin for WebF content that doesn't have a real URL. This is important for maintaining same-origin security policies in the JavaScript environment.

@param id Optional JavaScript context ID to make the URI unique per context @return A URI object representing the virtual bundle location

Implementation

static Uri fallbackBundleUri([double? id]) {
  // The fallback origin uri, like `vm://bundle/0`
  return Uri(scheme: 'vm', host: 'bundle', path: id != null ? '$id' : null);
}