Skip to content
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

Not a pull request! For your review. #27

Closed
wants to merge 1 commit into from

Conversation

nickl-
Copy link
Member

@nickl- nickl- commented Jun 14, 2012

As per discussions at #26

Please see #26 for more comments...

@nickl-
Copy link
Member Author

nickl- commented Jun 14, 2012

NOTE: This is for review purposes only do not commit.

A cleanup will be done first if we are going to consider this a viable solution.

@nickl-
Copy link
Member Author

nickl- commented Jun 28, 2012

Has anyone had a chance to look into this yet? We have a request at Respect/respect.github.com#7 to publish this on the site already.

I tried working with QueryPath again to get it integrated on another branch but it is very stubborn. the simplehtmldom is really a pleasure to work with, you have to actually be careful to not cast it to string by mistake and loose the nodes, isn't that more what we have in mind though. I've actually got it implemented in the armrest product and another where using the array traversal. I had another use case where I had a list/array of items which when added to the template would create span wrapped entries which wasn't desirable oh yes I recall.

it was appending <links ..../> elements to html head. Currently template would overwrite what you are trying to set but in this case they have to go to head and you don't want to be a bad citizen now. This would always be the case with head. So I adde a rule that if it's head then append so they came out wrapped in spans. This was so simple to fix I just added head to the getTags in traversal (where you negotiate which type of children you will be creating the array into.

I crossed my fingers and added head to the switch return ""(empty string) as the child containers. What do you think would happen with DOM if you tried to append child on an empty tag? Guess what happened with this solution? I actually hod the list of <link rags nicely stacked and thereafter appended to the header without any problems. Would still be nice to hear what you have to say? @augustohp, @alganet @henriquemoody any commnte?

@augustohp augustohp closed this Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants