added "Arguments"
This commit is contained in:
parent
be07f8e382
commit
b3742cf61f
|
@ -1,8 +1,9 @@
|
||||||
# reinitializer.js
|
# reinitializer.js
|
||||||
|
|
||||||
A library for tracking and reinitializing `<link>` and `<script>` elements so that the browser downloads them.
|
If you use AJAX technology, you probably noticed that by passing HTML-code and writing it into a document (for example, via `element.outherHTML = someHTML`), browsers does not perform semantic analysis and does not download documents connected using `<link> ` and `<script>` elements.
|
||||||
|
|
||||||
|
This program observed `<link>` and `<script>` elements, and recreates them in the right places so that the browser recognizes and downloads them.
|
||||||
|
|
||||||
Used when developing any dynamic requests via JS where links to third-party documents are supplied along with HTML content.
|
|
||||||
|
|
||||||
|
|
||||||
# Instruction
|
# Instruction
|
||||||
|
@ -22,3 +23,7 @@ By default, observation occurs on the first `<main>` element, but you can change
|
||||||
});
|
});
|
||||||
|
|
||||||
By default, after reinitialization, `<link>` elements are moved to the end of the `<head>` element, and `<script>` elements are moved to the end of the `<body>` element. You can override this behavior by changing the `reinitializer.js` and `reinitializer.css` properties.
|
By default, after reinitialization, `<link>` elements are moved to the end of the `<head>` element, and `<script>` elements are moved to the end of the `<body>` element. You can override this behavior by changing the `reinitializer.js` and `reinitializer.css` properties.
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
1. `data-reinitializer-ignore="true"` - The program will ignore this element
|
||||||
|
2. `data-reinitializer-once="true"` - The program will trigger the download only if there is no duplicate in the registry
|
Loading…
Reference in New Issue