Document-level global Polymer settings can be set
by creating a Polymer
object on window before importing the Polymer
library:
<html>
<head>
<meta charset="utf-8">
<script src="components/webcomponentsjs/webcomponents-loader.js"></script>
<script>
/* this script must run before Polymer is imported */
window.Polymer = {
rootPath: '/your/application/root'
};
</script>
<!-- a component that relies on Polymer -->
<link rel="import" href="elements/my-app.html">
</head>
<body>
...
Available settings:
Setting | Description |
rootPath
|
Sets a global rootPath property that can be used in templates to generate URLs that
are relative to the application root.
|
sanitizeDOMValue
|
A global callback used to sanitize any value before inserting it into the DOM.
The callback signature is:
Where:
|
There are also a number of polyfill-specific settings. See Polyfills for details.