Rabbit.Selector.innerHTML()

The innerHTML() method is used to display inner HTML content of the node found by the CSS selector.

Syntax

Rabbit.Selector.innerHTML(selector, parent)

Parameters

Parameter Type Description
selector String CSS selector.
parent Node object Context node against which the specified CSS selector will be executed.

Return Value

Type Description
String Inner HTML of the node found by the CSS selector.

Example

The example below demonstrates how to display HTML code available inside the BODY element.

Source HTML code available on your original desktop site page:

<html>
 <body>
   <h1>Hello World!</h1>
 </body>
</html>

You need to add the following code to your template to display HTML code available inside the BODY element:

<!--{= Rabbit.Selector.innerHTML('body') }-->

The result will look like:

<h1>Hello World!</h1>