Created
June 10, 2025 16:29
-
-
Save yuhgto/72a5f99d024353761273e1841d8dceb1 to your computer and use it in GitHub Desktop.
monday get context - Vanilla HTML JS example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Monday SDK Demo</title> | |
<!-- Import Monday SDK --> | |
<script src="https://cdn.jsdelivr.net/npm/monday-sdk-js/dist/main.js"></script> | |
</head> | |
<body> | |
<button id="submitBtn">Submit</button> | |
<script> | |
// Initialize the monday SDK | |
const monday = window.mondaySdk(); | |
// Add click event listener to the button | |
document.getElementById('submitBtn').addEventListener('click', function() { | |
monday.get('context').then(res => { | |
console.log('monday context:', res); | |
}).catch(err => { | |
console.error('Error fetching context:', err); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment