{"repo":"github/include-fragment-element","free":true,"listed":false,"github":"https://github.com/github/include-fragment-element","clone":"git clone https://github.com/github/include-fragment-element.git","description":"A client-side includes tag.","language":"JavaScript","stars":569,"topics":["web-components","custom-elements"],"license":"MIT","category":"ui-components","readme_excerpt":"&lt;include-fragment&gt; element A Client Side Includes tag. Installation Usage All include-fragment elements must have a src attribute from which to retrieve an HTML element fragment. The initial page load should include fallback content to be displayed if the resource could not be fetched immediately. Original On page load, the include-fragment element fetches the URL, the response is parsed into an HTML element, which replaces the include-fragment element entirely. Result The server must respond with an HTML fragment to replace the include-fragment element. It should not contain another include-fragment element or the server will be polled in an infinite loop. Other Attributes accept This attribute tells what to send as the Accept header, as part of the fetch request. If omitted, or if set to an empty value, the default behaviour will be text/html . It is important that the server responds with HTML, but you may wish to change the accept header to help negotiate the right content with the server. loading This indicates when the contents should be fetched: - eager : Fetches and load the content immediately, regardless of whether or not the is currently within the visible viewport (this is the default value). - lazy : Defers fetching and loading the content until the tag reaches a calculated distance from the viewport. The intent is to avoid the network and storage bandwidth needed to handle the content until it's reasonably certain that it will be needed. Errors If the URL ","default_branch":null,"files":null,"tree":[],"storefront":"/r/github","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/github/include-fragment-element/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}