Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16888 closed defect (invalid)

innerHTML not function

Reported by: DojoNovice@… Owned by: DojoNovice@…
Priority: undecided Milestone: tbd
Component: General Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

<section id="insert"></section>

<script> require(["dojo/ready", "dojo/dom"], function(ready, dom) { ready(function() { var fragment = "<b>test<i>test</i></b>"; var node = dom.byId("insert"); node.innerHMTL = fragment; dom works document.getElementById("insert").innerHTML = fragment; console.log(node.innerHMTL); }); }); </script>

If I use console - breakpoint, and type first node.innerHMTL and then node.innerHMTL = value, it works. But this fake doesnt work in code.

Attachments (1)

innerhtml.html (848 bytes) - added by DojoNovice@… 6 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 years ago by bill

Owner: set to DojoNovice@…
Status: newpending

I don't understand what you are saying. Use the "attach file" button to attach a full test case, and then list the expected results vs. the actual results.

Changed 6 years ago by DojoNovice@…

Attachment: innerhtml.html added

comment:2 Changed 6 years ago by DojoNovice@…

Status: pendingnew

Attachment (innerhtml.html) added by ticket reporter.

comment:3 Changed 6 years ago by DojoNovice@…

I want insert HTML fragment into section element. Same as query and innerHTML method.

comment:4 Changed 6 years ago by bill

Status: newpending

It looks OK, except I guess that <section> elements won't work on older browsers. What browser are you running on, and what happens when you run the code?

comment:5 Changed 6 years ago by DojoNovice@…

Status: pendingnew

Chrome Version 25.0.1364.172 m. Going to check it on other browsers.

comment:6 Changed 6 years ago by DojoNovice@…

I have tested it in Opera and same problem. Nothing was inserted into section element. See only empty screen and you? Do you see the text text? I have tested it on 2 computers. One with Tomcat and one with Apache.

I have a problem with Tomcat server and require method too. See this link please. http://dojo-toolkit.33424.n3.nabble.com/Tomcat-and-require-td3994987.html

Last edited 6 years ago by DojoNovice@… (previous) (diff)

comment:7 Changed 6 years ago by bill

Resolution: invalid
Status: newclosed

OK. You spelled innerHTML wrong. You typed innerHMTL.

comment:8 Changed 6 years ago by DojoNovice@…

omg :-) I shame on myself. You have right. I am using different keyboards now and then make char mistakes and Copy paste finish it :-). Thanks for help.

Last edited 6 years ago by DojoNovice@… (previous) (diff)
Note: See TracTickets for help on using tickets.