-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbasket.html
25 lines (25 loc) · 840 Bytes
/
basket.html
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
<!DOCTYPE HTML>
<html>
<head>
<title>basket.js with CSS</title>
</head>
<body>
<script src="lib/create-stylesheet.unwrapped-0.2.1.js"></script>
<script src="lib/basket.full.min-0.0.3.js"></script>
<script>
basket.require({ url: 'css/styles.css', execute: false }).then(function(responses) {
// HACK: function parameters for the promise method don't appear to be documented, but they contain the responses for now.
var css = responses[0];
_stylesheet.appendStyleSheet(css, function(err, style) {
if (err) {
console.error(err);
} else {
console.log("Stylesheet successfully load via basket.js");
}
});
});
</script>
<div id="absolute">green (absolute @import)</div>
<div id="relative">blue (relative @import)</div>
</body>
</html>