Git Product home page Git Product logo

Comments (10)

NeilFraser avatar NeilFraser commented on May 8, 2024

Just a random guess, is IE11 ok with


but not
?

from blockly.

NeilFraser avatar NeilFraser commented on May 8, 2024

Previous comment got rendered by GitHub. Heh. Let's try that again, this time HTML encoded...

Just a random guess, is IE11 ok with <hr/> but not <hr>?

from blockly.

carlosperate avatar carlosperate commented on May 8, 2024

That was my first guest as well, but it does not work either way. However, I just noticed that using <hr/> causes IE to also output the following:
XML5633 "End-tag name does not match the corresponding start-tag name." (https://msdn.microsoft.com/en-us/library/ie/dn423949(v=vs.85).aspx).

I started looking back the git history up to when the separators were added (5aed33b) and parseFromString() it's been problematic in IE11 from the beginning.

What I find interesting is that in my fork I am loading an XML file with <hr/> tags for the toolbox using XMLHttpRequest and it does seem to work fine in IE.

from blockly.

NeilFraser avatar NeilFraser commented on May 8, 2024

Does it want <hr><hr/>?

Or maybe it is allergic to an XML tag than looks like HTML? Does switching from <hr> to <ie_is_trash> or <ie_is_trash/> work?

from blockly.

carlosperate avatar carlosperate commented on May 8, 2024

<hr></hr> doesn't work.
<ie_is_trash> and <ie_is_trash/> don't work either.
<ie_is_trash></ie_is_trash> does work.
br behaves the same way hr does, so it seems to be specific to html tags.

from blockly.

NeilFraser avatar NeilFraser commented on May 8, 2024

Ok, that's really helpful, thank you.
I propose changing Blockly to use <sep></sep> instead of <hr>. Normally I'd push for allowing <hr> to live on as a deprecated alternative, but it looks like we need to actively eliminate it. I'll have Blockly (in non-IE browsers) print an error to the console if it sees a <hr> tag, ignore the tag, and continue parsing.

from blockly.

NeilFraser avatar NeilFraser commented on May 8, 2024

Change committed, documentation updated.

from blockly.

carlosperate avatar carlosperate commented on May 8, 2024

I was just about to suggest a slightly different approach. It's not an elegant fix, but it would maintain the hr tag usable in IE. I can prepare a demo in a little bit of time.

from blockly.

NeilFraser avatar NeilFraser commented on May 8, 2024

The feature is only two months old, so I think it's fine to make a breaking change to it. There's probably only one developer using <hr> right now (the one who asked for it originally).

from blockly.

carlosperate avatar carlosperate commented on May 8, 2024

Nevermind then. In case you are curios, IE was removing the self closing slash from the HTML DOM, and that is way it did not parse as valid XML (carlosperate@e990eb4). That is also why it worked in IE when I was loading the XML data from a file.

from blockly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.