File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change 44
55"use strict" ;
66
7- if ( ! String . prototype . startsWith ) {
8- String . prototype . startsWith = function ( searchString , position ) {
9- position = position || 0 ;
10- return this . indexOf ( searchString , position ) === position ;
11- } ;
12- }
13- if ( ! String . prototype . endsWith ) {
14- String . prototype . endsWith = function ( suffix , length ) {
15- const l = length || this . length ;
16- return this . indexOf ( suffix , l - suffix . length ) !== - 1 ;
17- } ;
18- }
19-
20- if ( ! DOMTokenList . prototype . add ) {
21- DOMTokenList . prototype . add = function ( className ) {
22- if ( className && ! hasClass ( this , className ) ) {
23- if ( this . className && this . className . length > 0 ) {
24- this . className += " " + className ;
25- } else {
26- this . className = className ;
27- }
28- }
29- } ;
30- }
31-
32- if ( ! DOMTokenList . prototype . remove ) {
33- DOMTokenList . prototype . remove = function ( className ) {
34- if ( className && this . className ) {
35- this . className = ( " " + this . className + " " ) . replace ( " " + className + " " , " " )
36- . trim ( ) ;
37- }
38- } ;
39- }
40-
417// Get a value from the rustdoc-vars div, which is used to convey data from
428// Rust to the JS. If there is no such element, return null.
439function getVar ( name ) {
You can’t perform that action at this time.
0 commit comments