-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update all sample codes to add await and async for initialize function #1008
Conversation
function facebookLogin() { | ||
microsoftTeams.authentication.notifySuccess('facebooklogin'); | ||
} | ||
function usingCredentialsLogin() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -8,7 +8,8 @@ | |||
integrity="sha384-lIk8T3uMxKqXQVVfFbiw0K/Nq+kt1P3NtGt/pNexiDby2rKU6xnDY8p16gIwKqgI" , | |||
crossorigin="anonymous"></script> | |||
<script> | |||
microsoftTeams.app.initialize(); | |||
microsoftTeams.app.initialize().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try once with await microsoftTeams.app.initialize()
@@ -14,7 +14,8 @@ | |||
<button onclick="selectHeroCards()">Hero Cards</button> | |||
<script> | |||
$(document).ready(function () { | |||
microsoftTeams.app.initialize(); | |||
microsoftTeams.app.initialize().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try once with await microsoftTeams.app.initialize()
@@ -18,7 +18,8 @@ | |||
<script src="https://res.cdn.office.net/teams-js/2.0.0/js/MicrosoftTeams.min.js" crossorigin="anonymous"></script> | |||
|
|||
<script> | |||
microsoftTeams.app.initialize(); | |||
microsoftTeams.app.initialize().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try once with await microsoftTeams.app.initialize()
@@ -86,7 +86,8 @@ | |||
|
|||
<script type="text/javascript"> | |||
$(document).ready(function () { | |||
microsoftTeams.app.initialize(); | |||
microsoftTeams.app.initialize().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try once with await microsoftTeams.app.initialize() and make the function async
@@ -30,7 +30,8 @@ | |||
|
|||
<script> | |||
|
|||
microsoftTeams.app.initialize(); | |||
microsoftTeams.app.initialize().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try once with await microsoftTeams.app.initialize()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update at all places if above code works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried, as per your PR comments, to await microsoftTeams.app.initialize(), but i am getting this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks correct., Approving!
Executed Build pipeline |
Executed Build pipeline - |
Bug Link - |
No description provided.