Package web components
Web components must be packaged with the GWA application because they are preloaded and must also be available offline.
The directory programdir/webcomponents is the default location for web components in your program directory. All components located there will be automatically packaged.
Furthermore, the gwabuildtool has a
--webcomponent
switch to bundle a web component from another location in the file
system other than programdir/webcomponents. The switch can
be used multiple times in the build command.
Including built-in web components
COMPONENTTYPE
attribute. This affects the build in the following way:- It adds the specified Built-in web components from
$FGLDIR/webcomponents to the build. For example, if a
COMPONENTTYPE
matches "fglsvgcanvas", the fglsvgcanvas web component is automatically included in the GWA. - It raises a warning if, for a particular
COMPONENTTYPE
, no web component has been packaged.
A call to ui.Interface.filenameToURI
(asset_in_filesystem) can be
used to produce URLs to make a web component visible.
Notice that URL paths starting with "webcomponent" refer to files bundled in the programdir/webcomponents subdirectory and URLs starting with HTTP(S) can refer to assets in the internet.
The gwa_webcos
demo is a good source to check the various asset paths.