com.gargoylesoftware.htmlunit.javascript
Class IEWeirdSyntaxScriptPreProcessor

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.javascript.IEWeirdSyntaxScriptPreProcessor
All Implemented Interfaces:
ScriptPreProcessor

public class IEWeirdSyntaxScriptPreProcessor
extends Object
implements ScriptPreProcessor

A script preprocessor removing weird syntax supported by IE like semicolons before catch or before finally in a try-catch-finally block.

Version:
$Revision: 6701 $
Author:
Marc Guillemot

Constructor Summary
IEWeirdSyntaxScriptPreProcessor()
           
 
Method Summary
static IEWeirdSyntaxScriptPreProcessor getInstance()
          Gets an instance of the pre processor.
 String preProcess(HtmlPage htmlPage, String sourceCode, String sourceName, int lineNumber, HtmlElement htmlElement)
          Pre process the specified source code in the context of the given page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IEWeirdSyntaxScriptPreProcessor

public IEWeirdSyntaxScriptPreProcessor()
Method Detail

getInstance

public static IEWeirdSyntaxScriptPreProcessor getInstance()
Gets an instance of the pre processor.

Returns:
an instance

preProcess

public String preProcess(HtmlPage htmlPage,
                         String sourceCode,
                         String sourceName,
                         int lineNumber,
                         HtmlElement htmlElement)
Pre process the specified source code in the context of the given page.

Specified by:
preProcess in interface ScriptPreProcessor
Parameters:
htmlPage - the page
sourceCode - the code to execute
sourceName - a name for the chunk of code that is going to be executed (used in error messages)
lineNumber - the line number of the source code
htmlElement - the HTML element that will act as the context
Returns:
the source code after pre processing


Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.