JavaScriptBundleOption

public enum JavaScriptBundleOption

Option how a JavaScript library is incorporated in a HTML document.

  • Include <script> tag that contains full source code of the library. Generated HTML is larger than the .online option but is portable and can be viewed offline.

    Declaration

    Swift

    case included
  • Include <script> tag that references the library location on a CDN (Content Delivery Network) server. Generated HTML is smaller than the .include case but requires internet connection for viewing.

    Declaration

    Swift

    case online
  • Include <script> tag that references external library bundle assumed to reside in the same directory as the HTML file.

    Declaration

    Swift

    case directory
  • Include <script> tag with a custom library bundle located in the specified URL.

    Declaration

    Swift

    case from(url: URL)
  • Don’t include the library. This is useful when the resulting <div> will be incorporated in a larger document where the library is already used.

    Declaration

    Swift

    case excluded