Referee - JavaScript External Object Analyzer
Analyze JavaScript code to identify external object references and method calls.
Input JavaScript Code:
// Example code with external objects and methods // Try modifying this code to see different results // Browser API calls document.getElementById('app').innerHTML = '
Hello World
'; window.addEventListener('load', function() { console.log('Page loaded'); localStorage.setItem('lastVisit', new Date().toString()); }); // External library usage const chart = new Chart(ctx, { type: 'bar', data: chartData }); chart.update(); // DOM manipulation const button = document.createElement('button'); button.textContent = 'Click me'; button.addEventListener('click', () => { fetch('/api/data') .then(response => response.json()) .then(data => { console.log(data); }); }); // More complex call chains navigator.geolocation.getCurrentPosition(position => { const { latitude, longitude } = position.coords; mapboxgl.Map.flyTo([latitude, longitude]); });
Analyze Code
Analysis Results:
Run the analysis to see results...