-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.test
65 lines (50 loc) · 2.68 KB
/
index.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Preload Processing steps
// - https://w3c.github.io/preload/#x3-1-processing
// - Blink Preload Tests
// - Mozilla Preload Issue https://bugzilla.mozilla.org/show_bug.cgi?id=1222633
/*
The appropriate times to obtain the resource are:
- When the user agent that supports [RFC5988] creates a Document
and processes Link headers that contain a preload link.
- When the preload link's link element is inserted into a document.
- When the preload link is created on a link element that is already in a document tree.
- When the href attribute of the link element of a preload link that is
already in a document tree is changed.
- When the crossorigin attribute of the link element of a preload link that is
already in a document tree is set, changed, or removed.
- When the as attribute of the link element of a preload link that is already in a
document tree is set or changed to a value that does not or no longer matches
the request destination of the previous obtained external resource, if any.
- When the as attribute of the link element of a preload link that is already in a document
tree but was previously not obtained due to the as attribute specifying an
unsupported request destination is set, removed, or changed.
- When the type attribute of the link element of a preload link that is already in a document tree
but was previously not obtained due to the type attribute not specifying a parsable MIME type
or specifying an unsupported MIME type for the request destination is set, removed, or changed.
- When the media attribute of the link element of a preload link that is
already in a document tree but was not previously obtained due the media
attribute's value being not a valid media query list or one that does not
match the environment is set, removed, or changed.
*/
// https://trac.webkit.org/browser/webkit/trunk/LayoutTests/http/tests/preload
const
slow_stylesheet = '"http://tools.w3clubs.com/pagr/1.sleep-1.css'
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement
// // disabled (stylesheets)
// href - for dynamic loading
// media - INTERESTING
// as - used for preload
// crossOrigin (experimental)
// referrerPolicy (experimental)
// rel - alternative/import/styelsheet/prefetch/preload/prerender
//
// prefetch attribute
// ? integrity - https://w3c.github.io/webappsec-subresource-integrity/
// ? load (Edge Chrome M)
// relList - RO = rel as list of tokens
// sheet - Stylesheet object
// type - mimetype of resource
//
// events
// (on)load
// The load event fires once the stylesheet and all of its imported content has been loaded and parsed, and immediately before the styles start being applied to the content.