This project is read-only.

Exception is caught in html to text demo

Sep 13, 2014 at 12:31 AM
I reforked the codeshow project on my machine. I'm trying out different demos, and when I click on HTML to TEXT demo it throws an exception, "#q" not found. Is it just me?
Sep 13, 2014 at 12:49 AM

No, that’s pretty common because I decided not to put the q function into the global namespace. It creates a dependency that confuses people. So I’ve been replacing most of them with another means of selection. For that one, you can replace q("#inpHTML") with simply inpHTML since all elements with an ID are put in the global namespace by IE automatically. In other places where you see something like q(".someClass") you’re going to need to use element.querySelector(".someClass"). Does that make sense?

BTW, the q() function offered some fancy functionality where it allowed you to select multiple things and it turned those into an array result automatically. If you come upon a demo where it’s being used for that, you have to either replace it with a manual method or you can just use the Ocho.query function explicitly. I think if the Ocho.query function is used explicitly it will be clear to anyone coming along.

Thanks!

Jeremy Foster

[email removed] // 206.250.7637