Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andreadev-it/stacking-contexts-inspector
/ functions
Functions
99 in github.com/andreadev-it/stacking-contexts-inspector
⨍
Functions
99
◇
Types & classes
8
↓ 14 callers
Function
getScriptConnection
* Get a script connection, and if there is no script associated with the tab, it injects it. * * @param {string} scriptId * @param {number} tabId
src/scripts/background.js:94
↓ 13 callers
Function
getConnection
()
src/scripts/components/ConnectionContext.js:31
↓ 4 callers
Method
addChild
* Adds a static context as a children of this context * * @param {StackingContext} context
src/scripts/classes/StackingContext.js:45
↓ 3 callers
Function
elementFromIndex
(container, index)
src/scripts/utils/utils.js:98
↓ 3 callers
Function
getPassedChecks
(element, pseudo)
src/scripts/utils/DOMTraversal.js:115
↓ 3 callers
Function
notifyVisibilityChange
(status)
src/scripts/components/ConnectionContext.js:9
↓ 2 callers
Function
initExtensionSettings
* Initialize the settings inside local storage to their default values
src/scripts/background.js:18
↓ 2 callers
Function
isValuableContainer
(container)
src/scripts/utils/utils.js:24
↓ 2 callers
Function
loadSettings
()
src/scripts/components/SettingsContext.js:17
↓ 2 callers
Function
openContext
(contextToOpen, index)
src/scripts/components/ContextsTree/ContextsTree.js:53
↓ 2 callers
Function
refreshContexts
()
src/scripts/components/DataContext.js:21
↓ 2 callers
Function
setContexts
(contextList)
src/scripts/components/DataContext.js:14
↓ 2 callers
Function
updateDevtoolsPageStatus
* Update the devtools pages visibility status in order to decide whether to start or stop the DOM observer * * @param {number} tabId The tab id *
src/scripts/background.js:233
↓ 1 callers
Function
analysePage
()
src/scripts/components/PanelContent/PanelContent.js:27
↓ 1 callers
Function
cancelHighlight
()
src/scripts/components/Context/Context.js:43
↓ 1 callers
Function
cancelHighlight
()
src/scripts/components/ContextsContainer/ContextsContainer.js:20
↓ 1 callers
Function
closeContext
(contextToClose, index)
src/scripts/components/ContextsTree/ContextsTree.js:67
↓ 1 callers
Function
disconnectObserver
* Just a utility function to allow adding and removing it as an event listener
src/scripts/content.js:241
↓ 1 callers
Method
exec
* Executes the check callback on the element passed as a parameter. Returns wether or not this Node creates a static context. * * @param {N
src/scripts/classes/ContextChecks.js:28
↓ 1 callers
Function
generateContextTree
(contextsList)
src/scripts/utils/utils.js:7
↓ 1 callers
Function
getContextIdFromNode
* Find the stacking context that contains a specific node as a child of its element. If the node creates a stacking context, return it. * * @param
src/scripts/content.js:110
↓ 1 callers
Function
getNodeFromPath
(path)
src/scripts/utils/utils.js:94
↓ 1 callers
Function
getPathFromNode
(node)
src/scripts/utils/utils.js:47
↓ 1 callers
Function
getRelativePosition
* Get the relative position of a specific element in the page (iframes included) * * @param {StackingContext} context * @return {Object} The relat
src/scripts/content.js:68
↓ 1 callers
Function
getSVGHTML
Get the svg element as a string from a file source
src/scripts/components/SVG.js:12
↓ 1 callers
Function
handleInspectedElement
()
src/scripts/components/SidebarContent/SidebarContent.js:38
↓ 1 callers
Function
hasTraversableShadowDOM
* Check whether or not this element has an open shadow DOM * * @param {Node} element The element to be checked * @returns {boolean}
src/scripts/utils/DOMTraversal.js:105
↓ 1 callers
Function
highlightContext
()
src/scripts/components/TreeItem/TreeItem.js:16
↓ 1 callers
Function
init
* Initialization method
src/scripts/background.js:297
↓ 1 callers
Function
initHighlightDOM
* Creates the element that will be used to highlight the contexts in the page. * * @return {Node} The actual DOM element with coherent styles appli
src/scripts/content.js:36
↓ 1 callers
Function
injectScript
* Inject the content script into a tab
src/scripts/background.js:79
↓ 1 callers
Function
isTraversableIframe
* Check if an element is an iframe that exposes its content to javascript * * @param {Node} element The element to be checked * @returns {boolean}
src/scripts/utils/DOMTraversal.js:93
↓ 1 callers
Function
linkChildren
(context)
src/scripts/utils/utils.js:10
↓ 1 callers
Function
loadExtensionSettings
* Load the extension settings * * @returns {Promise<Object>}
src/scripts/background.js:27
↓ 1 callers
Function
refreshContextsCache
()
src/scripts/components/SidebarContent/SidebarContent.js:60
↓ 1 callers
Function
saveSettings
(settings)
src/scripts/components/SettingsContext.js:24
↓ 1 callers
Function
selectContext
(context)
src/scripts/components/ContextsTree/ContextsTree.js:84
↓ 1 callers
Function
sendDOMChangedWarning
* Send a DOM Changed warning to the extension panel and sidebar
src/scripts/content.js:333
↓ 1 callers
Function
setShouldUpdate
(value)
src/scripts/components/ConnectionContext.js:23
↓ 1 callers
Function
setShouldUpdateSettings
(value)
src/scripts/components/ConnectionContext.js:27
↓ 1 callers
Function
setupDOMObserver
* Attach a mutation observer to the DOM and notify the extension that the contexts should be refreshed
src/scripts/content.js:212
↓ 1 callers
Function
startDOMObserver
* Start the DOM Observer * * @param {number} tabId
src/scripts/background.js:194
↓ 1 callers
Function
stopDOMObserver
* Stop the DOM Observer * * @param {number} tabId
src/scripts/background.js:205
↓ 1 callers
Function
svgFromString
Get the single svg element from a string that may contain also other elements
src/scripts/components/SVG.js:5
↓ 1 callers
Method
toJSON
* This will convert a stacking context to a JSON-friendly object in order to pass it to the background script and the devtools panel and sidebar.
src/scripts/classes/StackingContext.js:54
↓ 1 callers
Function
traverse
* Utility method to traverse a DOM element and check if it's a stacking context. It's recursive and * will traverse all the children down the tree.
src/scripts/utils/DOMTraversal.js:16
↓ 1 callers
Function
undoHighlightContext
()
src/scripts/components/TreeItem/TreeItem.js:21
Function
ConnectionContextProvider
({ scriptId, context, children })
src/scripts/components/ConnectionContext.js:17
Function
ContextsContainer
({container, noHighlight, delegatedClass, ...props})
src/scripts/components/ContextsContainer/ContextsContainer.js:7
Function
OptionBarSeparator
()
src/scripts/components/OptionBarSeparator/OptionBarSeparator.js:5
Function
PanelSettings
({className="", ...props})
src/scripts/components/PanelSettings/PanelSettings.js:7
Function
SVG
({src, ...props})
src/scripts/components/SVG.js:20
Function
Section
({ title, buttons, children })
src/scripts/components/Section/Section.js:6
Function
Spinner
({ position='absolute', width=100, height=100 })
src/scripts/components/Spinner/Spinner.js:8
Function
analysePage
* Analyzes the page related to a specific tab id and returns a JSON description of the stacking contexts. * * @param {number} tabId * @returns {A
src/scripts/background.js:114
Function
analysePage
* Analyse the page and initialize the 'allContexts' and 'rootContext' variables.
src/scripts/content.js:17
Function
callback
(mutationsList, observer)
src/scripts/content.js:217
Function
checkboxClicked
(event)
src/scripts/components/PanelSettings/PanelSettings.js:15
Function
cleanContexts
()
src/scripts/components/DataContext.js:32
Function
cleanup
()
src/scripts/components/SidebarContent/SidebarContent.js:72
Method
constructor
* Creates a new Stacking Context object * * @param {Node} element * @param {boolean} isInIframe * @param {Node} frame * @
src/scripts/classes/StackingContext.js:31
Method
constructor
* Creates a new ContextsContainer * * @param {string} name The container name * @param {Node} element The element related to this cont
src/scripts/classes/ContextsContainer.js:26
Method
constructor
(description, callback)
src/scripts/classes/ContextChecks.js:13
Function
detectLastInspectedElement
* Instruct the content script related to a specific tab to get the details about the last inspected element. * * @param {number} tabId * @param {
src/scripts/background.js:165
Function
detectLastInspectedElement
* Detect which node was tagged as "last inspected" from the devtools, and initialize the related variable.
src/scripts/content.js:152
Function
getAllContextsJSON
* Returns a copy of all the contexts converted to JSON. * * @return {Array} list of all contexts converted to JSON.
src/scripts/content.js:26
Function
getContextsFromPage
()
src/scripts/utils/DOMTraversal.js:139
Function
getInspectedElementDetails
* Get some details about the last selected element and its context * * @param {number} tabId * @returns {Object} The element details
src/scripts/background.js:176
Function
getInspectedElementDetails
* Get some details about the last inspected element. * * @returns {Object} An object containing the id of the context associated to the element and
src/scripts/content.js:173
Function
getPageFrames
()
src/scripts/components/DataContext.js:36
Function
getPageFramesSources
(tabId)
src/scripts/background.js:183
Function
getPageFramesSources
* Get all the iframes sources, to implement inspection on iframes * * @return {Array<string>} All the iframes src attributes
src/scripts/content.js:201
Function
getPathFromContext
(tabId, contextId)
src/scripts/background.js:154
Function
getPathFromContext
* Returns a path to get the element of a specific context even if it is inside an iframe or shadow DOM * * @param {Integer} contextId * @returns
src/scripts/content.js:144
Function
handleToggle
(event)
src/scripts/components/TreeItem/TreeItem.js:30
Function
highlightContext
* Highlight a context on a specific page. * * @param {number} tabId * @param {number} contextId The id of the context to be highlighted
src/scripts/background.js:128
Function
highlightContext
* Highlight the DOM Element related to a context. * * @param {number} id The id of the context to be highlighted.
src/scripts/content.js:51
Function
highlightNode
()
src/scripts/components/Context/Context.js:36
Function
highlightNode
()
src/scripts/components/ContextsContainer/ContextsContainer.js:13
Function
inspectNode
()
src/scripts/components/Context/Context.js:18
Method
isBeingInspected
()
src/scripts/classes/TabStatus.js:13
Function
isImportantMutation
* Check whether or not we're interested in this mutation and want to send a warning in the extension panel and sidebar * * @param {MutationRecord}
src/scripts/content.js:287
Function
isInternalMutation
* Check whether a specific mutation found by the observer was caused by our own extension or was generated by the page * * @param {MutationRecord}
src/scripts/content.js:309
Function
notifySettingsChanged
* Send a message to the extension panels to warn that the contexts should be refreshed.
src/scripts/background.js:44
Function
onHandlerError
* Handle the background handler errors (right now it just prints them to the console)
src/scripts/background.js:271
Function
paintOrderFunction
(a, b)
src/scripts/components/OrderedContextsList/OrderedContextsList.js:5
Function
saveExtensionSettings
* Save the new settings in the local chrome extension storage * * @param {Object} newSettings The updated settings * @returns {Promise}
src/scripts/background.js:62
Function
scrollToContext
* Scrolls the page related to a specific tab id in order to show a context. * * @param {number} tabId * @param {number} contextId
src/scripts/background.js:149
Function
scrollToContext
* Scroll the page to show the element related to a specific context. * * @param {number} id The context id.
src/scripts/content.js:100
Function
scrollToNode
()
src/scripts/components/Context/Context.js:31
Function
sendDOMChangedWarning
* Send a message to the extension panels to warn that the contexts should be refreshed.
src/scripts/background.js:214
Function
shouldInsert
(context)
src/scripts/components/ContextsTree/ContextsTree.js:91
Function
shouldShowToggle
()
src/scripts/components/TreeItem/TreeItem.js:26
Function
startDOMObserver
* Start observing the changes in the DOM
src/scripts/content.js:253
Function
stopDOMObserver
* Stop observing the changes in the DOM
src/scripts/content.js:275
Method
toJSON
* @returns A JSON-friendly object to represent this container
src/scripts/classes/ContextsContainer.js:37
Function
toggleSettings
()
src/scripts/components/PanelContent/PanelContent.js:32
Function
undoHighlightContext
* Remove the highlight that was set on the context. * * @param {number} tabId
src/scripts/background.js:138
Function
undoHighlightContext
* Remove the highlight element from the page.
src/scripts/content.js:90