This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
creylopez
/
django-ex
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
2
Wiki
Activity
Browse Source
DIV-604: Adding startsWith prototype to string function when not present in case code is run in IE11 because it does not have support for the String.startsWith
pull/160/head
Benard Ebinu
8 years ago
parent
69524a2382
commit
ee0f62beff
1 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
edivorce/apps/core/static/js/functions.js
+ 9
- 0
edivorce/apps/core/static/js/functions.js
View File
@ -1,3 +1,12 @@
// Internet Explorer 11 implementation of String does not have the startsWith function
// so manually add it to prevent an error on load.
if
(
!
String
.
prototype
.
startsWith
)
{
String
.
prototype
.
startsWith
=
function
(
searchString
,
position
)
{
position
=
position
||
0
;
return
this
.
substr
(
position
,
searchString
.
length
)
===
searchString
;
}
;
}
// Show or Hide Information Section
// Using following data attributes:
// data-target_id: id of information section
Write
Preview
Loading…
Cancel
Save