MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / findImageUsingMap

Function findImageUsingMap

javascript/atoms/typescript/is-displayed.ts:206–210  ·  view source on GitHub ↗
(mapName: string, doc: Document)

Source from the content-addressed store, hash-verified

204 }
205
206 function findImageUsingMap(mapName: string, doc: Document): Element | null {
207 // Use querySelector instead of a full-DOM scan; escape the map name so
208 // special characters in the CSS attribute value string are handled safely.
209 return doc.querySelector('[usemap="#' + mapName.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"]');
210 }
211
212 function maybeFindImageMap(elem: Element): ImageMapResult | null {
213 var isMap = isElement(elem, 'MAP');

Callers 1

maybeFindImageMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected