iD icon indicating copy to clipboard operation
iD copied to clipboard

Support Extension Access to coreContext in Production

Open julcnx opened this issue 8 months ago • 1 comments

Description

Browser extensions that enhance the iD editor—such as the Strava Heatmap extension—rely on access to coreContext in order to interact with native iD functions and provide deeper editor integration.

Currently, coreContext is only exposed in development, but not in production. As a result, extensions like Strava Heatmap must resort to fragile workarounds, hooking into the page load process and the window.iD property to capture the coreContext reference.

Exposing coreContext in production would simplify extension development by avoiding these overrides, and would also allow power users and testers to experiment with the API directly from the console.

Screenshots

No response

julcnx avatar May 09 '25 16:05 julcnx

Coming from #1392 - I realise this issue is focused on browser extensions, but if you just want access to coreContext for spontaneous debugging, queryObjects(Rapid.Context) works in RapiD, but not iD (since we don't use ES classes)

k-yle avatar Dec 05 '25 11:12 k-yle