-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accounting for new event type! #38
base: master
Are you sure you want to change the base?
Conversation
needed to get this up and running in short order, from what I can tell, re-adding experimental object seemed to solve the issue. although also did some quick updates to the options panel as well, to sort out any other possible causes.
switch added to accommodate both Canary and Chrome for the next 6 or so weeks.
clearly.
needed to check for inspectedWindow support.
This reverts commit 1b894d9.
oops, without this we wipe everything out! all fixord.
I don’t yet see what the problem is. How could onResourceContentCommitted fire with event.type font? Could you provide example page? |
I can give it a shot. Can't honestly say what environment variable came into play, but console logging the event type in devtools.html showed "font". Typically after refreshes and only on newly created styles. I would assume this only applies to newly created inline element styles. |
need to enable font in local storage otherwise the loop that checks against these values fails and returns backend error (although its actually based on options selected)
hey Nikita, how can I provide an example page to you that you can set up? zip file? |
ill do that. also on a related note, ive found that if you have a stylesheet before and after an external script include, the document.head.querySelectorAll("link[rel=stylesheet][href]") tends to only return those that fall before.... could be more to this but ill make up a test case. |
on further thought this makes perfect sense, since js is going to block and that event doesnt wait for domready. guess thats all the more reason to push your js to the bottom of the page. im just working in an older environment that can't be easily updated to that end. |
No, it’s not. http://elv1s.ru/x/script-between-stylesheets.html |
give it a go with some heavier script includes... http://dev.drew.co.vi/x/script-between-stylesheets.html for these screenshots I changed these lines (starting at 57 in devtools):
|
After 28dc2bd getLastStylesheetURL executes lazily on adding new CSS rule, so it should be fixed. Check out version from the repo. |
Is any of this still relevant? |
I keep getting it sometimes. But admittedly less so as of late since I've been using the style sheet in the body technique. |
DevTools console is much more verbose now. Provide an output from it next time the problem happens. |
I finally found the issue!
Turns out in some cases, the event type is "font" but needs to be handled exactly how document is currently handled.
In the process, I added an option and removed it (as i dont see it as necessary to opt into font changes) however this did cause an error in the mapping of options.js. So I also built in a fallback in the case that an input is not discovered and returns undefined.