33import type { Options , Attach } from '../dist' ;
44import { Hovercards } from '../dist' ;
55
6- addEventListener ( 'DOMContentLoaded' , ( ) => {
6+ addEventListener ( 'DOMContentLoaded' , ( ) => {
77 // To test types
88 const options : Options = {
99 placement : 'right' ,
@@ -13,23 +13,23 @@ addEventListener('DOMContentLoaded', () => {
1313 'View profile' : 'View profile 😜' ,
1414 } ,
1515 } ;
16- const hovercards = new Hovercards ( options ) ;
16+ const hovercards = new Hovercards ( options ) ;
1717
1818 // To test type
19- const attach : Attach = ( target , opts ) => {
20- hovercards . attach ( target , opts ) ;
19+ const attach : Attach = ( target , opts ) => {
20+ hovercards . attach ( target , opts ) ;
2121 } ;
22- attach ( document . body , { ignoreSelector : '' } ) ;
22+ attach ( document . body , { ignoreSelector : '' } ) ;
2323
2424 // To test sanitization
25- document . getElementById ( 'inline-hovercard' ) ?. appendChild (
26- Hovercards . createHovercard ( {
25+ document . getElementById ( 'inline-hovercard' ) ?. appendChild (
26+ Hovercards . createHovercard ( {
2727 hash : '99c3338797c95c418d9996bd39931506' ,
2828 avatarUrl : 'https://www.gravatar.com/avatar/99c3338797c95c418d9996bd39931506?s=60&d=retro&r=g&esc=^^' ,
2929 profileUrl : 'https://gravatar.com/wellyshen' ,
3030 displayName : '<i>gyp</i>' ,
3131 location : '<i>Earth</i>' ,
3232 description : '<i>Test</i>, &, <, >, ", ', `' ,
33- } )
33+ } )
3434 ) ;
35- } ) ;
35+ } ) ;
0 commit comments