javascript - How to know if a certain Node is the Head of an HTML document? -
this question has answer here:
i'm working on chrome extension add features existing page. that, need add script page as possible!! (no, cannot run content script starts before everything, need particular script inserted into dom)
(why? because page loads everythin using ajax calls, , need able perform operations before calls)
so intent add script sooner can after head of document appears.
i'm looking @ mutationsobserver
, , seems job. how can check if node
addednodes
collection head???
since looks maybe provided answer actual problem, i'll post answer.
you can use chrome plug-in api directly intercept ajax requests using this: https://developer.chrome.com/extensions/webrequest
Comments
Post a Comment