File tree 2 files changed +3
-14
lines changed
packages/auth/src/platform_browser
2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { FirebaseApp , getApp , _getProvider } from '@firebase/app' ;
19
- import { safeAttrPrefix } from 'safevalues' ;
20
- import { safeElement } from 'safevalues/dom' ;
21
19
22
20
import {
23
21
initializeAuth ,
@@ -126,7 +124,7 @@ _setExternalJSProvider({
126
124
// TODO: consider adding timeout support & cancellation
127
125
return new Promise ( ( resolve , reject ) => {
128
126
const el = document . createElement ( 'script' ) ;
129
- safeElement . setPrefixedAttribute ( [ safeAttrPrefix `src` ] , el , 'src' , url ) ;
127
+ el . setAttribute ( 'src' , url ) ;
130
128
el . onload = resolve ;
131
129
el . onerror = e => {
132
130
const error = _createError ( AuthErrorCode . INTERNAL_ERROR ) ;
Original file line number Diff line number Diff line change 18
18
import { expect , use } from 'chai' ;
19
19
import * as sinon from 'sinon' ;
20
20
import sinonChai from 'sinon-chai' ;
21
- import { safeAttrPrefix } from 'safevalues' ;
22
- import { safeElement } from 'safevalues/dom' ;
23
21
24
22
import {
25
23
_generateCallbackName ,
@@ -46,12 +44,7 @@ describe('platform-browser/load_js', () => {
46
44
loadJS ( url : string ) : Promise < Event > {
47
45
return new Promise ( ( resolve , reject ) => {
48
46
const el = document . createElement ( 'script' ) ;
49
- safeElement . setPrefixedAttribute (
50
- [ safeAttrPrefix `src` ] ,
51
- el ,
52
- 'src' ,
53
- url
54
- ) ;
47
+ el . setAttribute ( 'src' , url ) ;
55
48
el . onload = resolve ;
56
49
el . onerror = e => {
57
50
const error = _createError ( AuthErrorCode . INTERNAL_ERROR ) ;
@@ -72,9 +65,7 @@ describe('platform-browser/load_js', () => {
72
65
73
66
// eslint-disable-next-line @typescript-eslint/no-floating-promises
74
67
_loadJS ( 'http://localhost/url' ) ;
75
- expect ( safeElement . setPrefixedAttribute ) . to . have . been . calledWith (
76
- [ safeAttrPrefix `src` ] ,
77
- el ,
68
+ expect ( el . setAttribute ) . to . have . been . calledWith (
78
69
'src' ,
79
70
'http://localhost/url'
80
71
) ;
You can’t perform that action at this time.
0 commit comments