I will eventually publish an example but I am still working through various options to make the usage of
Web Components with QuickBase dead simple. QuickBase does not allow a
<link> element in either
(1) a text formula field with some HTML allowed or
(2) a form text section so I am using a formulas such as the following to implement the HTML import:
[import] & "import.html" & [/import]
All the heavy details are hidden in the definition of the two user defined variables
[import] and
[/import] and once setup will not need to change. This is the same general technique as used with the image
onload technique:
[iol] & "module.js" & [/iol]
Note the the imported file is a
HTML file
not a
JavaScript file and that the contents are not blindly inserted into the DOM. It is a little complicated to explain but a HTML import can safely import HTML, JavaScript, CSS and other resources without interfering between the host page and the imported page.
These are the most informative articles on understanding HTML Imports:
Exploring HTML Importshttp://robdodson.me/exploring-html-imports/HTML Importshttp://www.html5rocks.com/en/tutorials/webcomponents/imports/