Components Testing

From HTML5 Builder
Jump to: navigation, search

The following techniques will help you test your custom components.

Rendered Code

At design time, you can check the code generated by a component using the Tag Viewer.

To check it at runtime, when the component is printed to a webpage opened on a browser, you can:

  • Open the source code of the page from the web browser (usually Ctrl+U), and look for your component’s code.
  • Right-click on your component and select “Inspect Element”, to get the component code focused on your browser’s developer tools widget.
  • Run $("#ComponentName_outer") ou your browser’s JavaScript console, you will get your component’s code as return value.

Of course, these instructions will vary from browser to browser, and might not be available on some browsers.

PHP Errors

When your component is rendered on the Designer, PHP errors are handled by HTML5 Builder, and their output text will be displayed on an error dialog.

At runtime, you will get the errors directly in the webpage.