Add sizzle support
Use the same `document` tracking fix/hack as in our CDP driver.
This commit is contained in:
parent
49317d7c19
commit
6c97825295
4 changed files with 17 additions and 8 deletions
|
|
@ -1,8 +1,4 @@
|
|||
window.ph_select = function(sel) {
|
||||
if (!window.Sizzle) {
|
||||
return Array.from(document.querySelectorAll(sel));
|
||||
}
|
||||
|
||||
if (sel.includes(":contains(")) {
|
||||
if (!window.Sizzle) {
|
||||
throw new Error("Using ':contains' when window.Sizzle is not available.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue