File tree Expand file tree Collapse file tree
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ function RemoteFunctions(config = {}) {
3636 // this will store the element that was clicked previously (before the new click)
3737 // we need this so that we can remove click styling from the previous element when a new element is clicked
3838 let previouslySelectedElement = null ;
39+ // Expose the currently selected element globally for external access
40+ window . __current_ph_lp_selected = null ;
3941
4042 var req , timeout ;
4143 function animateHighlight ( time ) {
@@ -710,6 +712,7 @@ function RemoteFunctions(config = {}) {
710712 _clickHighlight . add ( element , true ) ;
711713
712714 previouslySelectedElement = element ;
715+ window . __current_ph_lp_selected = element ;
713716 }
714717
715718 function disableHoverListeners ( ) {
@@ -1317,6 +1320,7 @@ function RemoteFunctions(config = {}) {
13171320 }
13181321 delete previouslySelectedElement . _originalOutline ;
13191322 previouslySelectedElement = null ;
1323+ window . __current_ph_lp_selected = null ;
13201324 }
13211325
13221326 if ( config . mode === 'edit' ) {
You can’t perform that action at this time.
0 commit comments