I try to get the DOM I select by ContextMenu
in Chrome Extension.
Code:
chrome.contextMenus.onClicked.addListener(function(info, tab){
// the info.selectionText just the text, don not contains html.
});
chrome.contextMenus.create({
title: "Demo",
contexts: ["selection"],
id: "demo"
});
but the info.selectionText don't contains the HTML DOM. Is there any way to get the selection dom in Chrome extension contextMenu?. Please suggest. thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…