Skip to content

Instantly share code, notes, and snippets.

@yuhgto
Created June 10, 2025 16:29
Show Gist options
  • Save yuhgto/72a5f99d024353761273e1841d8dceb1 to your computer and use it in GitHub Desktop.
Save yuhgto/72a5f99d024353761273e1841d8dceb1 to your computer and use it in GitHub Desktop.
monday get context - Vanilla HTML JS example
<!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