Skip to content

Instantly share code, notes, and snippets.

@andre347 andre347/index.html
Created Oct 12, 2018

Embed
What would you like to do?
Tableau Extension: Step 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Data-Refresh Tableau</title>
</head>
<body>
<h1>Hello Tableau!</h1>
<script src="js/tableau-extensions-1.latest.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>
// When the DOM has load, run the function load
document.addEventListener("DOMContentLoaded", load);
function load() {
//initialise the tableau object, wait for the promise to return and grab the name of the dashboard
tableau.extensions.initializeAsync().then(() => {
const dashboard = tableau.extensions.dashboardContent.dashboard;
console.log(dashboard.name);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.