SVG Window.crypto Property
Last Updated :
30 Mar, 2022
The SVG Window.crypto property returns the Crypto object associated to the global object.
Syntax:
var cryptoObj = window.crypto
Return value: This property returns the Crypto object associated to the global object.
Example 1:
<!DOCTYPE html>
< html >
< body >
< svg viewBox = "0 0 1000 1000"
< text x = "50" y = "20" font-size = "20px"
onmouseover = "check()" >
GeeksForGeeks
</ text >
< script type = "text/javascript" >
function check() {
console.log(window.crypto);
}
</ script >
</ svg >
</ body >
</ html >
|
Output:
Example 2:
<!DOCTYPE html>
< html >
< body >
< svg viewBox = "0 0 1000 1000"
< circle cx = "50" cy = "50" r = "50"
onclick = "check()" />
< script type = "text/javascript" >
function check() {
console.log(window.crypto);
}
</ script >
</ svg >
</ body >
</ html >
|
Output:
Share your thoughts in the comments
Please Login to comment...