From 3faa5509eac5c5535b637131dd3939332b11a19d Mon Sep 17 00:00:00 2001 From: Tobe O Date: Mon, 9 Jul 2018 02:19:22 -0400 Subject: [PATCH] Doc comments --- lib/src/inline_assets.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/inline_assets.dart b/lib/src/inline_assets.dart index 2e33b36f..e1f4e327 100644 --- a/lib/src/inline_assets.dart +++ b/lib/src/inline_assets.dart @@ -7,6 +7,14 @@ import 'package:html/dom.dart' as html; import 'package:html/parser.dart' as html; import 'package:path/path.dart' as p; +/// Wraps a `VirtualDirectory` to patch the way it sends +/// `.html` files. +/// +/// In any `.html` file sent down, `link` and `script` elements that point to internal resources +/// will have the contents of said file read, and inlined into the HTML page itself. +/// +/// In this case, "internal resources" refers to a URI *without* a scheme, i.e. `/site.css` or +/// `foo/bar/baz.js`. VirtualDirectory inlineAssets(VirtualDirectory vDir) => new _InlineAssets(vDir); class _InlineAssets extends VirtualDirectory {