webfiori / ui Goto Github PK
View Code? Open in Web Editor NEWA set of classes for creating HTML documents.
Home Page: https://webfiori.com/learn/ui-package
License: MIT License
A set of classes for creating HTML documents.
Home Page: https://webfiori.com/learn/ui-package
License: MIT License
When using the method HTMLNode::setAttribute()
with an attribute which has a string as a value and the string contains double Quotes, the generated HTML will be invalid.
$node = new HTMLNode('input')
$node->setAttribute('placeholder','This will "CAUSE" the bug to appear');
echo $node;
The output of the shown code will be as follows:
<input placeholder="This will "CAUSE" the bug to appear">
The double quotes will cause the value of the attribute to be "This will " and the remaining text will invalidate the generated HTML.
It was noticed that if HTML elements tree goes very deep, the performance of rendering the page becomes worst. The reason for this is caused by the method HTMLNode::_setParent()
. The method loops through all child notes to set if attribute names are quoted or not.
Add direction attribute with value rtl in case of arabic language to html tag, so that <html lang="ar">
will become <html dir="rtl" lang="ar">
instead.
Make a pointer to the last node in the TableRow class in order to facilitate the setting of attributes and classes.
You need to know the index of node, which might be troublesome when adding/removing other nodes.
$tableRow->addCell('something');
$tableRow->children()->get(5)->setStyle(['color' => 'red']);
Also, this implementation, which will require more boilerplate code.
$tableRow->addCell('something');
$tableRow->children()->get($tableRow->childrenCount() - 1)->setStyle(['color' => 'red']);
$tableRow->addCell('something');
$tableRow->getLastChild()->setStyle(['color' => 'red']);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.