The web components used through HTML import encapsulate both the shadow HTML code and the associated script.
To narrow down the terminology, consider that we have a core-ajax polymer component . Here is the code . As you can see, it does not contain any HTML markup at all, enclosing only a script.
After importing on the host web page:
<link
rel="import"
href="https://www.polymer-project.org/components/core-ajax/core-ajax.html">
this component provides the ability to make AJAX calls without javascript encoding:
<core-ajax
auto
url="http://gdata.youtube.com/feeds/api/videos/"
params='{"alt":"json", "q":"chrome"}'
handleAs="json"
response='{{response}}'
</core-ajax>
( auto ) URL- response. :
- response='{{response}}'
+ on-core-response="{{handleResponse}}"
handleResponse javascript .
UPD. , DOM, w3c. , , " ".