|
1 | 1 | <!DOCTYPE HTML>
|
2 |
| -<html lang="en" class="light" dir="ltr"> |
| 2 | +<html lang="en" class="light sidebar-visible" dir="ltr"> |
3 | 3 | <head>
|
4 | 4 | <!-- Book generated using mdBook -->
|
5 | 5 | <meta charset="UTF-8">
|
|
8 | 8 |
|
9 | 9 |
|
10 | 10 | <!-- Custom HTML head -->
|
11 |
| - |
| 11 | + |
12 | 12 | <meta name="description" content="">
|
13 | 13 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
14 | 14 | <meta name="theme-color" content="#ffffff">
|
|
31 | 31 |
|
32 | 32 | <!-- Custom theme stylesheets -->
|
33 | 33 |
|
34 |
| - </head> |
35 |
| - <body class="sidebar-visible no-js"> |
36 |
| - <div id="body-container"> |
| 34 | + |
37 | 35 | <!-- Provide site root to javascript -->
|
38 | 36 | <script>
|
39 | 37 | var path_to_root = "";
|
40 | 38 | var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
41 | 39 | </script>
|
42 |
| - |
| 40 | + <!-- Start loading toc.js asap --> |
| 41 | + <script src="toc.js"></script> |
| 42 | + </head> |
| 43 | + <body> |
| 44 | + <div id="body-container"> |
43 | 45 | <!-- Work around some values being stored in localStorage wrapped in quotes -->
|
44 | 46 | <script>
|
45 | 47 | try {
|
|
61 | 63 | var theme;
|
62 | 64 | try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
63 | 65 | if (theme === null || theme === undefined) { theme = default_theme; }
|
64 |
| - var html = document.querySelector('html'); |
| 66 | + const html = document.documentElement; |
65 | 67 | html.classList.remove('light')
|
66 | 68 | html.classList.add(theme);
|
67 |
| - var body = document.querySelector('body'); |
68 |
| - body.classList.remove('no-js') |
69 |
| - body.classList.add('js'); |
| 69 | + html.classList.add("js"); |
70 | 70 | </script>
|
71 | 71 |
|
72 | 72 | <input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
|
73 | 73 |
|
74 | 74 | <!-- Hide / unhide sidebar before it is displayed -->
|
75 | 75 | <script>
|
76 |
| - var body = document.querySelector('body'); |
77 | 76 | var sidebar = null;
|
78 | 77 | var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
|
79 | 78 | if (document.body.clientWidth >= 1080) {
|
|
83 | 82 | sidebar = 'hidden';
|
84 | 83 | }
|
85 | 84 | sidebar_toggle.checked = sidebar === 'visible';
|
86 |
| - body.classList.remove('sidebar-visible'); |
87 |
| - body.classList.add("sidebar-" + sidebar); |
| 85 | + html.classList.remove('sidebar-visible'); |
| 86 | + html.classList.add("sidebar-" + sidebar); |
88 | 87 | </script>
|
89 | 88 |
|
90 | 89 | <nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
91 |
| - <div class="sidebar-scrollbox"> |
92 |
| - <ol class="chapter"><li class="chapter-item expanded affix "><a href="introduction.html">Introduction</a></li><li class="chapter-item expanded affix "><li class="part-title">Getting Started</li><li class="chapter-item expanded "><a href="getting-started/installation.html"><strong aria-hidden="true">1.</strong> Installation</a></li><li class="chapter-item expanded "><a href="getting-started/hello_world.html"><strong aria-hidden="true">2.</strong> Hello World</a></li><li class="chapter-item expanded "><a href="getting-started/cargo-php.html"><strong aria-hidden="true">3.</strong> cargo php</a></li><li class="chapter-item expanded affix "><li class="part-title">Reference Guide</li><li class="chapter-item expanded "><a href="types/index.html"><strong aria-hidden="true">4.</strong> Types</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="types/numbers.html"><strong aria-hidden="true">4.1.</strong> Primitive Numbers</a></li><li class="chapter-item expanded "><a href="types/string.html"><strong aria-hidden="true">4.2.</strong> String</a></li><li class="chapter-item expanded "><a href="types/str.html"><strong aria-hidden="true">4.3.</strong> &str</a></li><li class="chapter-item expanded "><a href="types/bool.html"><strong aria-hidden="true">4.4.</strong> bool</a></li><li class="chapter-item expanded "><a href="types/vec.html"><strong aria-hidden="true">4.5.</strong> Vec</a></li><li class="chapter-item expanded "><a href="types/hashmap.html"><strong aria-hidden="true">4.6.</strong> HashMap</a></li><li class="chapter-item expanded "><a href="types/binary.html"><strong aria-hidden="true">4.7.</strong> Binary</a></li><li class="chapter-item expanded "><a href="types/binary_slice.html"><strong aria-hidden="true">4.8.</strong> BinarySlice</a></li><li class="chapter-item expanded "><a href="types/option.html"><strong aria-hidden="true">4.9.</strong> Option</a></li><li class="chapter-item expanded "><a href="types/object.html"><strong aria-hidden="true">4.10.</strong> Object</a></li><li class="chapter-item expanded "><a href="types/class_object.html"><strong aria-hidden="true">4.11.</strong> Class Object</a></li><li class="chapter-item expanded "><a href="types/closure.html"><strong aria-hidden="true">4.12.</strong> Closure</a></li><li class="chapter-item expanded "><a href="types/functions.html"><strong aria-hidden="true">4.13.</strong> Functions & methods</a></li><li class="chapter-item expanded "><a href="macros/async_impl.html"><strong aria-hidden="true">4.14.</strong> Async futures</a></li></ol></li><li class="chapter-item expanded "><a href="macros/index.html"><strong aria-hidden="true">5.</strong> Macros</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="macros/module.html"><strong aria-hidden="true">5.1.</strong> Module</a></li><li class="chapter-item expanded "><a href="macros/module_startup.html"><strong aria-hidden="true">5.2.</strong> Module Startup Function</a></li><li class="chapter-item expanded "><a href="macros/function.html"><strong aria-hidden="true">5.3.</strong> Function</a></li><li class="chapter-item expanded "><a href="macros/classes.html"><strong aria-hidden="true">5.4.</strong> Classes</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="macros/impl.html"><strong aria-hidden="true">5.4.1.</strong> impls</a></li><li class="chapter-item expanded "><a href="macros/async_impl.html"><strong aria-hidden="true">5.4.2.</strong> async impls</a></li></ol></li><li class="chapter-item expanded "><a href="macros/constant.html"><strong aria-hidden="true">5.5.</strong> Constants</a></li><li class="chapter-item expanded "><a href="macros/zval_convert.html"><strong aria-hidden="true">5.6.</strong> ZvalConvert</a></li></ol></li><li class="chapter-item expanded "><a href="exceptions.html"><strong aria-hidden="true">6.</strong> Exceptions</a></li><li class="chapter-item expanded "><a href="ini-settings.html"><strong aria-hidden="true">7.</strong> INI Settings</a></li></ol> |
93 |
| - </div> |
| 90 | + <!-- populated by js --> |
| 91 | + <mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox> |
| 92 | + <noscript> |
| 93 | + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> |
| 94 | + </noscript> |
94 | 95 | <div id="sidebar-resize-handle" class="sidebar-resize-handle">
|
95 | 96 | <div class="sidebar-resize-indicator"></div>
|
96 | 97 | </div>
|
97 | 98 | </nav>
|
98 | 99 |
|
99 |
| - <!-- Track and set sidebar scroll position --> |
100 |
| - <script> |
101 |
| - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); |
102 |
| - sidebarScrollbox.addEventListener('click', function(e) { |
103 |
| - if (e.target.tagName === 'A') { |
104 |
| - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); |
105 |
| - } |
106 |
| - }, { passive: true }); |
107 |
| - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); |
108 |
| - sessionStorage.removeItem('sidebar-scroll'); |
109 |
| - if (sidebarScrollTop) { |
110 |
| - // preserve sidebar scroll position when navigating via links within sidebar |
111 |
| - sidebarScrollbox.scrollTop = sidebarScrollTop; |
112 |
| - } else { |
113 |
| - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons |
114 |
| - var activeSection = document.querySelector('#sidebar .active'); |
115 |
| - if (activeSection) { |
116 |
| - activeSection.scrollIntoView({ block: 'center' }); |
117 |
| - } |
118 |
| - } |
119 |
| - </script> |
120 |
| - |
121 | 100 | <div id="page-wrapper" class="page-wrapper">
|
122 | 101 |
|
123 | 102 | <div class="page">
|
124 |
| - <div id="menu-bar-hover-placeholder"></div> |
| 103 | + <div id="menu-bar-hover-placeholder"></div> |
125 | 104 | <div id="menu-bar" class="menu-bar sticky">
|
126 | 105 | <div class="left-buttons">
|
127 | 106 | <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
|
0 commit comments